11 - review (three loops)


#1


I'm on exercise 11 of the 'While' loop section - for some reason I keep developing infinite loops. What am I missing?

https://www.codecademy.com/en/courses/javascript-beginner-en-ASGIv/2/4?curriculum_id=506324b3a7dffd00020bf661#


// Write your code below!
for(var i = 0; i < 1001; i +100) {
    console.log(i);
}

var peach = 1;
while(peach === 1) {
    console.log("Dems peaches is ew!");
    peach = 0;
}

var muffin = false
    do { 
        console.log("There's two muffins left!");
    } while (muffin);


#2

never mind...I fixed it myself. Tried to make the "for" loop count by 100's but didn't write it properly.


#3

I think your problem is this code snippet here:

for(var i = 0; i < 1001; i +100) {
    console.log(i);
}

It needs to be
i+= 100


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.