19/28


#1

("Jon".length * 2 / (2+1) === 2)
if {
console.log("True");
}
else
{
console.log("error error error");
}

says "Oops, try again. Parentheses surround the condition in if statements. Try inserting a '(' before the '{' on line 2.

I don't know what to do please help


#2

looks like your if statement starts after your condition.. start there...


#3

Hi
I'm having a similar problem when I use the following code I get , when my answer is
"true!" in the black box

"Oops, try again.
Make sure your if/else statement evaluates to true!"
//code
if ("Jon".length * 2 / (2+1) ===2)
{
console.log("true!")
}
else
{
console.log("Error Error Error")
}


#4

Hey there!
I had a similar problem there.
The point is that in practice that would be good and it would evaluate to true too, but now codecademy is saying that it evaluates to true when if statement is correct. And in the beginning there was written that if statement should say "The answer makes sense!". That means that you did everything right, but you just need to know that if statement evaluates to true when it is correct.
You're code should look something like this:
console.log("The answer makes sense!")
Please like my post if I helped you! Thanks.


#5

Many thanks for that, it threw me a bit, I guess it's a matter of fully understanding the question first before trying it out, I believe Einstein said something about this!


#6

your code must look like this

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