23

JavaScript --有关提升

 5 years ago
source link: https://juejin.im/post/5bb76c00f265da0af407224a
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
先有鸡还是先有蛋? 当我们执行下面一段代码: a=2; var a; console.log(a); 复制代码他会输出什么呢?可能有部分人会认为是undefined,因为 var a 在 a=2 之后声明,所以会被重新赋值故为undefined。 But,告诉

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK