Heading for the future
摘要: 首先,三者第一个参数都为this指向 区别 bind返回的是一个函数体 call和apply会直接执行,但是call参数需要一个一个进行传递,apply的第二个参数是一个数组 实现 bind 简单实现 Function.prototype.myBind = function(context){ se 阅读全文
posted @ 2020-09-13 12:58 一只菜鸟攻城狮啊 阅读(688) 评论(0) 推荐(0) 编辑
摘要: 使用async和await 1 var fn = async function(promiseArr) { 2 for(let i = 0,len = arr.length; i<len; i++) { 3 currentPromise = (promiseArr[i] instanceOf Pro 阅读全文
posted @ 2020-09-13 10:40 一只菜鸟攻城狮啊 阅读(2207) 评论(0) 推荐(0) 编辑