Recent Changes

Updates in the last 30 days

(for "2026-03-09 Create ranges of numbers in vanilla JS" only)

1 | 3 | 7 | 30 | 90 days
List all changes Include rollbacks Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2026-03-09

  • 15:41 UTC (new) (history) 2026-03-09 Create ranges of numbers in vanilla JS . . . . mbork Sometimes you need to create an array with the sequence of numbers, say from 0 to 9. Popular libraries like Lodash or Ramda have a function for that (in both cases, it’s called range), but how to do that concisely in vanilla JS? In case you’re wondering, both Lodash and Ramda use a while loop for this task; can we do better? (In this case “better” does not necessarily mean “faster”, but “shorter”, and – let’s be honest — “in a more clever/hackish/crazy way”.) It turns out that the answer is yes.

More...

Filters