2022年10月25日
摘要: 错误写法: let total = arr.reduce((prev, next) => prev + next.acc); 正确写法: let total = arr.reduce( (prev, next) => prev + next.acc, 0 ); 需要提供第二个参数来reduce为ac 阅读全文
posted @ 2022-10-25 10:11 写最骚的代码 阅读(83) 评论(0) 推荐(0) 编辑