簡(jiǎn)答題
- https 握手
- 隱藏節(jié)點(diǎn)的方法,區(qū)別
- jsonp 原理
編程題
- 求數(shù)組最大深度
let arr = [1,2,[3,[4,5]],6]
// 返回 3
- 給重復(fù)字符串添加序號(hào)
let arr = ['ab','b','ab','c']
// 返回 ['ab1','b','ab2','c']
填空題
console.log(1);
let a = new Promise((_, reject) => {
console.log(2);
reject(3);
})
.then(console.log)
.catch(console.log)
.then(() => 4);
console.log(5);
a.then(console.log);
求輸出順序