19. Math


#1


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


What is wrong in this code?
 i get error like "Oops, try again. There was a problem with your syntax."


#2

where is your if ?

syntax:

if(condition){
      //do something
}
else{

  //do something else
}

#3

oops! sorry... i didn't check that.. thank you :slight_smile:


#4

I added the if, but I still get it wrong. Please help. (http://discuss.codecademy.com/t/19-math/78916)


#5

Never mind. I forgot the last number 2 in this part of the code:
if ("Jon".length * 2 / (2+1) ===2)
Number I forgot
:sweat_smile:


#6

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