wxthahha

Results 2 comments of wxthahha

> ```js > Foo > ``` 没提升吧 提升了没赋值应该是 typeError 不该是 ReferenceError ,ReferenceError说明就没定义 > > @alanchanzm 1. `class` 声明会提升 . 是不是写错了? > > 原文: Class declarations, unlike function declarations, are not...

### 第一种 var -> let ### 第二种 settimeout绑定参数,回调传参 setTimeout((i) => { console.log(i); }, 1000,i) ### 第三种 使用外部变量保存每一次的i let j = i; setTimeout(() => { console.log(j); }, 1000) ### 第四种立即执行函数传参i或者回调函数包裹立即执行函数 ((i)=>setTimeout(()...