76
rated 0 times
[
78]
[
2]
/ answers: 1 / hits: 23096
/ 9 Years ago, mon, january 25, 2016, 12:00:00
Let's say I want a variable to contain numbers from 1 to 100.
I could do it like this:
var numbers = [1,2,3,4,...,98,99,100]
But it would take a bunch of time to write all those numbers down.
Is there any way to set a range to that variable? Something like:
var numbers = [from 1, to 100]
This might sound like a really nooby question but haven't been able to figure it out myself. Thanks in advance.
More From » variables