Skip to content

字节二面

手撕相关 x5

1, 说输出, 以及有何不同

js
var a = 1;
function b() {
    a = 10;
    return;
    function a(){}
}
js
var a = 1;
function b() {
    a = 10;
    return;
}

2, 如何优化爆栈问题

js
var list = readHugeList();

var nextListItem = function(){

    var item = list.pop();
    if(item){
        nextListItem();
    }
}

3,利用现有的promise提供的api, 实现promise.prototype.finally();

4, 实现Promise.all方法

5: 用react全局实现Modal组件, 使用方式jsx形式和函数调用Modal.show()

什么应用开发, 什么底层能力, balabalabala的

本站访客数 人次 本站总访问量