摘要: 一 Airbnb javascript编码规范 1 引用 1.1 对所有的引用使用 const ,不要使用 var。 eslint: prefer-const, no-const-assign 这能确保你无法对引用重新赋值,也不会导致出现 bug 或难以理解 1 2 3 4 5 6 7 1 2 3 阅读全文
posted @ 2017-08-25 14:47 大智ywz 阅读(427) 评论(0) 推荐(0)
摘要: [1, 2, 3].reduce((total, n) => { console.log(total, n) return total + n; }, 10); 阅读全文
posted @ 2017-08-25 14:27 大智ywz 阅读(107) 评论(0) 推荐(0)