Skip to content
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

第三十七题:void 0 #37

Open
Ray-56 opened this issue Oct 9, 2019 · 1 comment
Open

第三十七题:void 0 #37

Ray-56 opened this issue Oct 9, 2019 · 1 comment
Labels
JavaScript 解释型编程语言

Comments

@Ray-56
Copy link
Owner

Ray-56 commented Oct 9, 2019

void 0 表示什么

@Ray-56 Ray-56 added the JavaScript 解释型编程语言 label Oct 9, 2019
@MMmaXingXing
Copy link

void 0 == undefined

介绍

在js中,void的作用是对给定的表达式赋值,并且返回undefined

为什么用void 0

void 0 是表达式中最短的。用 void 0 代替 undefined 能节省字节。并且在es5中 undifind可能在局部被重写。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript 解释型编程语言
Projects
None yet
Development

No branches or pull requests

2 participants