while(true){
var x = 0
console.log(x 1)}
I want a basic counter. In a while true loop it needs to start from 0 and add 1 every time. How can I do that ? The loop needs to stop when it reaches to a number, lets say 50.
CodePudding user response:
var x = 0
while(x < 50){
console.log(x )
}