Created
September 2, 2014 03:06
-
-
Save lanrion/9ad77c25b827b6744b07 to your computer and use it in GitHub Desktop.
JavaScript 中2个等号与3个等号的区别
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一直挺纠结这个问题的。 | |
首先,== equality 等同,=== identity 恒等。 | |
==, 两边值类型不同的时候,要先进行类型转换,再比较。 | |
===,不做类型转换,类型不同的一定不等。 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment