Possible Duplicate:
Why {} != ( {} ) in JavaScript?
I tried it today and it threw me SyntaxError today and it made me wonder; what’s wrong with this?
{} === {}
{} == {}
What’s wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When
{is the first token in a line, it’s considered the start of block.And not an object literal. A block of code cannot be equal to anything, it’s not an assignable thing.
That will set the parser straight.