admin管理员组

文章数量:1391756

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 ?

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 ?

Share Improve this question edited Oct 21, 2015 at 16:58 Haradzieniec asked Oct 21, 2015 at 16:56 HaradzieniecHaradzieniec 9,34833 gold badges122 silver badges227 bronze badges 3
  • 9 Hmmm... === followed by ! maybe? – Álvaro González 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. – Haradzieniec Commented Oct 21, 2015 at 16:59
  • 1 Related: stackoverflow./questions/1642028/… – Seiyria Commented Oct 21, 2015 at 17:01
Add a ment  | 

1 Answer 1

Reset to default 12

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

本文标签: javascriptWhat doesoperator in JS meanStack Overflow