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



Replace this line with your code. 

var car = true:

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


var car = true:

why : after true?


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


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?


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


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