+ 1
JS how to count by 10? : 10 20 30...
How do u count by 10 or other number, but for example let's count by 10. ( print 10, 20, 30, 40.....100
5 Answers
+ 1
var count=0;
setInterval(()=>console.log(1?count += 10:0),1000)
0
i'm not sure what you're asking.
but if you want to put those numberas an array
Array(size).join().split(',').map(function (e, i){ console.log(++i*m); return ++i* m })
//where size is the array size, and m is the multiplier
0
Taste you know how we print numbers 1 to 5 using for statement:
var x;
for (x = 0; x < 5; x++) ...
output: 12345
Now i want the output to be 1020304050 (10, 20, 30....100).
0
like this ?
for(x=0;x<100;x+=10)
0
Taste Yup âď¸