For or while problem


#1


https://www.codecademy.com/courses/javascript-beginner-en-qDwp0/0/3?curriculum_id=506324b3a7dffd00020bf661#

I'm not understanding what exactly I've done wrong? it keeps saying there is an error with my santax but no matter what I've changed it still behaves the same way?

// Write your loop below!
number = true
var loop = function(number)
while(number);{
    console.log("pass");
    number = false;
}


#2

fixed it...

var number = 0;
for(i=number; i <= 10; i++){
console.log("The number is " + i);
}
while (i){
console.log("This is a while statement")
i = false
}

I needed to go review how to use for and while statements and get more familiar with the way they are used,


#3

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