remixz / run-js

A prototyping server that just works.
MIT License
188 stars 12 forks source link

While loop issue #15

Open ricky11 opened 2 years ago

ricky11 commented 2 years ago

When i run the following while loop in run js, the results are little odd, could be my programming.

var counter = 1;

while(counter <= 10){
    console.log(counter);
    counter = counter + 1;
}

result in 1 2 11 3 4 5 6 7 8 9 10

but it should result in :

1 2 3 4 5 6 7 8 9 10