Lesson 28 part 2


#1

if (0 < 2) then {
console.log"I finished my first course!";
}
else {
console.log"try again";
}

Not sure what I am doing wrong, please help!


#2

Hi @logahnc,

If it may help please see the code example below. You had a minor visit from the syntax gremlins in this case.
First we need to remove the term 'then' from your code, this is not a recognized term JavaScript recognizes like this. We then need to just add the missing parens for your use of the method console.log() and you should be good to carry on.

if (0 < 2) { //remove then 
console.log ("I finished my first course!"); //added parens because console is a type of method
}
else {
console.log ("try again"); //added parens because console is a type of method
}

#3

Thanks a lot! I got it to work!