-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null 和 undefined #156
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最初设计
null
null
表示 空值、不存在的 或 不可用的值。null
必须显式赋值。null
可以作为函数的参数,表示这个参数为空值,没有值。null
作为原型链的终点。undefined
undefined
表示变量已经声明,但是还没有初始化。undefined
。undefined
。undefined
。相同点
==
比较时相等。不同点
typeof
返回值不同。===
比较时不相等。参考资料
The text was updated successfully, but these errors were encountered: