2022.05.16
1.有效字符串
2。BFS 实现二叉树
3.promise 输出顺序
4.hash 路由和 history 路由 优缺点
长列表渲染 1w 个节点有什么优化手段吗
6.设计一套流程 控制并发请求
function requestData(urls = [], callback = () => {}) {
let requestArr = [];
for (let i = 0; (length = urls.length); i++) {
requestArr.push(fetch(urls[i]));
}
Promise.all(requestArr)
.then((res) => {
callback(res);
})
.catch((err) => {
console.log(err);
});
}增加一个最大数量开关
最后更新于