【求职】字节跳动 前端

  • 浏览器缓存

  • 事件循环

  • 输入url到页面现实过程

  • transition和animation性能比较(应该问的是复合图层相关)

  • promise实现原理

  • getElementById和querySelector的区别和性能

  • 箭头函数

  • generator,async,let,const

  • csrf

  • 节流防抖

  • 闭包

  • dom树转换成对象(虚拟dom树的构建)

  • 二叉树节点有0和1,将0的去除(leetcode第一题)

  • flex布局

  • https原理

  • vue双向绑定原理

  • key,diff算法

  • 算法(数组中两个值的和等于给定值,最好有最优解)

  • 性能优化

  • async function async1() {
        console.log('async1 start');
        await async2();
        console.log('async1 end');
    }
    async function async2() {
        console.log('async2');
    }
    
    console.log('script start');
    setTimeout(function() {
        console.log('setTimeout');
    }, 0);
    async1();
    new Promise(function(resolve) {
        console.log('promise1');
        resolve();
    }
    ).then(function() {
        console.log('promise2');
    });
    console.log('script end');
    
  • document.body.addEventListener('click', () => {
     Promise.resolve().then(()=>console.log(1));
     console.log(2)
    });
    document.body.addEventListener('click', () => {
     Promise.resolve().then(()=>console.log(3));
     console.log(4)
    });
    
  • promise.all方法实现,类似的finally done race

求职必备刷题官网:https://github.com/bennyrhys/interview
【更多互联网公司笔试面试真题请关注“让我遇见相似的灵魂”公众号】

猜你喜欢

转载自blog.csdn.net/weixin_43469680/article/details/106841605