11. Review, ben having a hard time this chapter! I cant figure out whats wrong with my code


#1

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


Replace this line with your code. 

var car = true:

for (var i = 0; i < 11; i++) {
    console.log(i);  
}
while(car) {
    console.log("Hello!");
    car = false;
}
do {
    console.log("I'm sexy as hell!");
} while(car);


#2

var car = true:

why : after true?


#3

I thought thats what we were supposed to do, I dont even understand these chapters. if you could explain what I am doing?


#4

In this lesson you need to improve your skills in loops. So, you need to write three loops. JavaScript supports different kinds of loops:
1. for loops through a block of code a number of times;
2. the while loop loops through a block of code as long as a specified condition is true;
3. the do/while loop is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.

What kind of help you need?


#5

Its hard to understand the uses of the loops in development?


#6

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