Johnlee

Results 2 comments of Johnlee

for (var i = 0; i < 10; i++) { setTimeout (function (i) { console.log (i); //10 10 10 .... }, 1000); } 为啥我这边执行是10个undefined ?

嗯,楼主写的有问题 ![_20190215172459](https://user-images.githubusercontent.com/28055423/52847259-a78cb900-3146-11e9-8c5f-e6dab2dfc1d6.png)