For or while problem


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)
    number = false;


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,


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