摘要:
function myPromise(fn) { var value = null, callbacks = []; this.then = function (onFulfilled) { callbacks.push(onFulfilled); }; function resolve(value) {... 阅读全文
posted @ 2019-03-28 14:23
落逸
阅读(60)
评论(0)
推荐(0)
摘要:
const compose = (...fns) => value => fns.reverse().reduce((acc, fn) => fn(acc), value) compose( third, second, first )("test") //等于 third(second(first(test))) 阅读全文
posted @ 2019-03-28 13:56
落逸
阅读(109)
评论(0)
推荐(0)
摘要:
let arr = [{ name: "1", children: [{ name: " 1 - 1", }, { name: " 1 - 2", children: [{ name: "1 - 2 - 1", }, ] ... 阅读全文
posted @ 2019-03-28 09:54
落逸
阅读(113)
评论(0)
推荐(0)


浙公网安备 33010602011771号