This is really pretty basic:
for (var i = 0; i < x; ++i) console.log(i);
(Use <=
if you want to include the value of x
in the output.)
1
solved Get number from one to x in a loop?
This is really pretty basic:
for (var i = 0; i < x; ++i) console.log(i);
(Use <=
if you want to include the value of x
in the output.)
1
solved Get number from one to x in a loop?