javascriptfirebugconditional-statementsequalsequality

Why does ";" == ";" evaluates to "false"?


Why does this (Firebug Console):

> ";" == ";"
> false

But this:

> ';' == ';'
> true

Anyone knows why this is happening?


Solution

  • Because, despite looking similar, U+037E : GREEK QUESTION MARK is not the same as U+003B : SEMICOLON

    What Unicode character is this? to the rescue for this kind of trick question.