摘要: 本文参考:https://aotu.io/notes/2016/04/14/js-reduce/index.html arr.reduce(callback[, initialValue]) 实例: 数组 arr = [1,2,3,4] 求数组的和 forEach 实现 123 var arr = 阅读全文
posted @ 2020-03-09 19:53 故木 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 字符串扩展 字符串接口遍历器 for (let codePoint of 'foo') { console.log(codePoint) } // "f" // "o" // "o" 2.模板字符串 穿插变量 //旧写法 $('#result').append( 'There are <b>' + 阅读全文
posted @ 2020-03-09 18:50 故木 阅读(124) 评论(0) 推荐(0) 编辑