0

This is my code:

for (var i=1;1<=10;i++) {
    console.log(i);
}

var count = 10;
while (count>0) {
    console.log(count);
    count--;
}
do {
    console.log("1 loop");
} while (count === 1000);

The only thing I could think of is an infinite loop, but there doesn't seem to be one to me.

1 Answer 1

5

The first line of your code has a 1 instead of an i

for (var i=1;1<=10;i++) {
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! That was pretty dumb of me ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.