54

聊聊一道简单的javascript面试题

 6 years ago
source link: https://juejin.im/post/5a9ab9e3f265da238e0d32e2
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.
下面是一道很入门的js面试题: for (var i = 0; i < 10; i++) { setTimeout(function () { console.log(i) }, 10 * i) } 几乎每个前端在初学js的都会遇到这个问

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK