- 博客(2)
- 收藏
- 关注
原创 eslint规则以及配置,前端开发结构
“no-sparse-arrays”: 2,//禁止稀疏数组, [1,2] “no-sync”: 0,//nodejs 禁止同步方法 “no-ternary”: 0,//禁止使用三目运算符 “no-trailing-spaces”: 1,//一行结束后面不要有空格 “no-this-before-super”: 0,//在调用super()之前不能使用this或super “no-throw-literal”: 2,//禁止抛出字面量错误 throw “error”; “no-undef”: 1,//不能有
2021-09-09 19:39:36
247
原创 ES6十大功能,前端开发提高班
运行结果如下: Sum of [1,2,3,4] is 10 Product of [1,2,3,4] is 24 3.箭头函数 执行非常简单的函数(如上述的Sum或Product)需要编写大量的模版。 有什么解决办法吗? 是的,可以尝试箭头函数! var array = [1, 2, 3, 4] const sum = (acc, value) => acc + value const product = (acc, value) => acc * value
2021-09-09 19:38:02
85
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人