-
Notifications
You must be signed in to change notification settings - Fork 1
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
第二十一题:var x, y = 1; x + y = ? #21
Labels
JavaScript
解释型编程语言
Comments
答案 NANvar x = undifind; |
js 中变量定义后没有赋值,默认是undefined ,而 数字 + undefined ,也就是数值型 和其他类型数据运算(非字符串型),会把非数值型数据转换成数值型,所以undefined 被转成 NaN ,NaN 和任何数值运算还是NaN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: