#16 Comparisons: What is wrong with my comparisons?


#1


Replace this line with your code.


#2

Hi can you post your code?


#3

if ("Gina".length < 2)
{
console.log ("say hi");
}
else
{
console.log ("say bye");
}


#4

The instruction says..
02. If your condition is true, use console.log to print "The condition is true".
03. Otherwise (else) when it is false, use console.log to print "The condition is false".


#5

My condition IS false and it does printout on the right "say bye", but the program won't let me advance saying Oops, try again.
It looks like your if/else statement didn't log "The condition is false" to the console.


#6

The instructions are telling you the text strings they want you to use for both console.log statements. They are not asking for text strings "say hi" or "say bye".


#7

Thank you! Duh! I can't believe I missed that. (It worked.)


#8

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