Hi all i was just wondering if JS has a range function which will return numbers defined in an offset. I'm not using jQuery, so pure JS would be the best solution for me.
I want to get a set of numbers in sets of 5 i.e.
I was wondering if this is possible at all? I was also looking at the underscore library to see if there's any handy methods but i couldn't find anything related to this at all.
If you're using ES6/2015 then you can also do this in pure JS (although, a little messy :P)
Array(5).fill().map((x,i)=>i);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With