0

What does ===! operator in JS mean?

Just checked in the browser console,

5 ===! 5 //false 5 ===! 6 //false 5 ===! 7 //false 

What's the meaning of ===! ? Yes, three equal signs and exclamation sign thereafter. Thank you.

Or, 5 ===! 5 is treated as 5 === false ?

3
  • 9
    Hmmm... === followed by ! maybe? Commented Oct 21, 2015 at 16:58
  • Nope. Exactly as I've asked. Otherwise I won't ask, as I know ! and the difference between == and ===. Thank you. Commented Oct 21, 2015 at 16:59
  • 1
    Related: stackoverflow.com/questions/1642028/… Commented Oct 21, 2015 at 17:01

1 Answer 1

12

It's not an operator, it's two of them. It is parsed as 5 === (!5), whitespace is ignored between tokens.

Sign up to request clarification or add additional context in comments.

2 Comments

Hehe... thank you. So, even ===!<space>5 is treated as === !5. Didn't pay attention to that.
Yes, it's four tokens: 5,===,!,5. Whitespace doesn't matter.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.