I can't seem to get 19 right. There is a syntax error. What is wrong?


#1

if
("Jon".length * 2 / (2+1) === )
{
console.log("The answer makes sense!");
}
else
("Jon".length * 2 / (2+1) === )
{
console.log ("Error Error Error")
}


#2

Hey @belleb101! The part you got wrong is just an understanding concept! This is the layout IF THIS HAPPENES DO THIS, ELSE DO THAT. Not in your case IF THIS HAPPENES DO THIS ELSE IF THIS HAPPENES DO THIS. No. So this is your code you got wrong

Just change the else to:

else 
{
console.log ("Error Error Error")
}

Dont get me wrong you could make a IF THIS HAPPENES DO THIS, Else IF THIS HAPPENES DO THIS ELSE THIS HAPPENS For example:

  if(2>=2){
console.log("Something")
}
else if(3==3){
console.log("Good")
}
else{
console.log("Not Good")
}

Understand now? Here is a documentation about it