Trouble with Javascript Exercise 16 "More Practice With Conditionals"


#1


https://www.codecademy.com/courses/getting-started-v2/2/5?curriculum_id=506324b3a7dffd00020bf661#


Hello all, I'm getting an error message reading "Oops, try again. Your condition evaluated to true! It should evaluate to false." I'm no math whiz but 10 is less than 3 the last time I checked. I've tried a variety of other if statements including
if ("Thomas".length > 10) and if (6 * 9 !== 54) and gotten the same error message each time. I assume something is wrong with my syntax. Any help would be appreciated. Thank you :slight_smile:


if (10 < 3)
{
    console.log("The condition is true");
}
else 
{
    console.log("The condition is true");
}


#2

HI it's because

else 
{
    console.log("The condition is true");
}

your else statement print

console.log("The condition is true");

instaed of

console.log("The condition is false")

#3

I'm a dummy, thank you!


#4

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