Review of Loops in JS


#1


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


Syntax Error: Unexpected identifier


var condition = true;
var gater = function(){
for (i=0;i>101;i+=5); {
 do {
     console.log("Here we go!");
     condition = false;
 }
while (condition);
};
};
get gater();


#2

for (i=0;i>101;i+=5);

you shouldn't have a ; after for loop
also see the condition i>101

and here

get gater();

what are you doing here?you can simply call the function with function name.like

gater();


#3

Thanks so much!
Fixed it!


#4

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