摘要: reduce() 方法对数组中的每个元素执行一个由您提供的reducer函数(升序执行),将其结果汇总为单个返回值。(汇合) 先看个例子 const array1 = [1, 2, 3, 4]; const reducer = (accumulator, currentValue) => accum 阅读全文
posted @ 2021-03-24 17:12 香香香。。。。香菜 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 参考promise详解:https://juejin.cn/post/6844903664209887246 async、await 使用 async/await, 搭配promise,可以通过编写形似同步的代码来处理异步流程, 提高代码的简洁性和可读性 async 用于申明一个 function 阅读全文
posted @ 2021-03-24 16:50 香香香。。。。香菜 阅读(2178) 评论(0) 推荐(0) 编辑