美文网首页
字节笔试

字节笔试

作者: 心_c2a2 | 来源:发表于2019-12-16 10:55 被阅读0次

简答题

  • https 握手
  • 隐藏节点的方法,区别
  • jsonp 原理

编程题

  • 求数组最大深度
let arr = [1,2,[3,[4,5]],6]

// 返回 3
  • 给重复字符串添加序号
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);

求输出顺序

相关文章

网友评论

      本文标题:字节笔试

      本文链接:https://www.haomeiwen.com/subject/rzicbctx.html