What Wrong with my Code?


#1


if("Jon".length * 2 / (2+1) === 3)
{
    console.log("Thank you!")
}
else
{
    console.log("Error Error Error")
}


#2

which exercise is this?

uhm.. 3 * 2 / 3 results in two, not three? so you might want to compare with 2


#3

No,the wrong massage is"Make sure your if/else statement evaluates to true!"


#4

well just explains that 3 * 2 / 3 is two, which results in:
2 === 3
which is not true? You need to change something, to make sure the condition is true, because if you do the math, you will that at the moment the condition is not true


#5

well,I changed it like this

if ("Jon".length * 2 / (2+1) === 2)
{
console.log("Thank you!");
}
else
{
console.log("Error Error Error");
}

but I got the same wrong massage"Make sure your if/else statement evaluates to true!"


#6

Can you provide the exercise url? There are like 30 exercises in this section, i am not going to try them all


#7

19 Math


Thank you


#8

you should complete what provided by the exercise, so when if is true, this is what should be logged to the console:

console.log("The answer makes sense!");

you changed it, causing the error message.


#9

opps,that`s clean!Thank you for your help!


#10