Section 11


#1

Here is my code. I can't find the issue but I keep getting "there was a problem with your syntax"

for (var count = 1; count <= 20; count ++) {
console.log ("My count is at " + count);
}

var answer = true;
while (answer) {
console.log ("I'm the man!!");
answer = false;
}

var truth = false;
do {
console.log ("You're right, he is the man!!);
} while (truth);


#2

Hi @yankeemarko1,

Please see the code sample below. In short you were just missing the closing quote for the string in you do while loop :slightly_smiling:

for (var count = 1; count <= 20; count ++) {
    console.log ("My count is at " + count);
}

var answer = true;
while (answer) {
    console.log ("I'm the man!!");
    answer = false;
}

var truth = false;
do {
    console.log ("You're right, he is the man!!"); //mmissing closing quote for the string
} while (truth);

#3

Thanks!! I swear, I stared at this for 30 minutes and did not see that missing quote. Reminds me of the good old days when I could never get my COBOL to compile!!