I like to define a simple range
function in my JavaScript projects, in order to easily adopt a functional approach when I need to work with integer intervals:
1 | function range(start, end) { |
Basic usage:
1 | range(0, 10) |
I like to define a simple range
function in my JavaScript projects, in order to easily adopt a functional approach when I need to work with integer intervals:
1 | function range(start, end) { |
Basic usage:
1 | range(0, 10) |