`range` in javascript

a few seconds ago

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]