Stuck on lesson 19. Math of java script


#1



I am stuck on lesson 19 of javascript. Titled "Math"

messages.> I do everything it says to do and it still comes out with an error! Please can you tell me how to do it?!


Replace this line with your code. 
if ("Jon".length * 2 / (2+1) === 9 )
{
    console.log("The answer makes sense!");
} 
else 
{ }
    console.log("Error error error");
}


#2

take a look at this:

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

you close your else really quickly, remove the } so the console.log is inside the else:

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

your if condition should evaluate to true, it doesn't. 3 * 2 / 3 is 2, not 9


#3

2 posts were split to a new topic: 19. math of javascript


#4

Thanks for the help!


#5

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