Credit to GitHub Copilot.
I didn’t know you could provide a map function to Array.from
as a second argument until today.
Array.from({ length: 10 }, (_, i) => i)
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Sep 13, 2021 · 1min
Credit to GitHub Copilot.
I didn’t know you could provide a map function to Array.from
as a second argument until today.
Array.from({ length: 10 }, (_, i) => i)
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]