This commit is contained in:
qianguyihao
2018-04-08 22:41:47 +08:00
parent 5756787f81
commit 7fd06bf252
16 changed files with 84 additions and 18 deletions

View File

@@ -0,0 +1,35 @@
## 面试题
### 20180321面试题
```javascript
console.log(1);
setTimeout(function () {
console.log(2);
}, 1000);
setTimeout(function () {
console.log(3);
}, 0);
console.log(4);
```
### 20180321面试题
```javascript
var arr = [1, 2, 3];
for (var i = 0; i < arr.length; i++) {
setTimeout(function () {
console.log(i);
}, 0);
}
```
打印结果333