+ 1

How do I increase a variable every second?

How do I increase a variable every second in JavaScript?

27th Oct 2022, 12:01 PM
This is junk email
This is junk email - avatar
3 Respostas
+ 2
lol Using setInterval var i = 0; setInterval(function() { i++; console.log(i) }, 1000);
27th Oct 2022, 5:33 PM
A͢J
A͢J - avatar
+ 3
variable or value?
27th Oct 2022, 12:03 PM
A͢J
A͢J - avatar
+ 1
A͢J value of a variable
27th Oct 2022, 5:13 PM
This is junk email
This is junk email - avatar