大飞_dafei

导航

随笔分类 -  ES

ECMAScript全称
JSHint
摘要:JSHint JSHint: Incompatible values for the 'esversion' and 'es3' linting options. (0% scanned).(E059) esnext正在弃用"esversion": 6 去掉 {"es3": true, "esnex 阅读全文

posted @ 2021-12-22 11:30 大飞_dafei 阅读(149) 评论(0) 推荐(0)

es6 语法
摘要:es6 语法 01) 反引号使用变量 `${ let daFei = "test_反引号"; let foo = "hello"; let bar = "world"; let str = `${daFei}/${foo}/${bar}`; console.log(str); 阅读全文

posted @ 2020-08-05 14:55 大飞_dafei 阅读(91) 评论(0) 推荐(0)

es6 模块 export 与 import _fei
摘要:es6 模块 export 与 import export default 命令 在一个文件或模块中,export、import 可以有多个,export default 仅有一个。 export default 中的 default 是对应的导出接口变量。 通过 export 方式导出,在导入时要 阅读全文

posted @ 2020-05-03 06:46 大飞_dafei 阅读(94) 评论(0) 推荐(0)

高阶函数 filter map reduce _fei
摘要:高阶函数 filter map reduce // 高阶函数 filter map reduce 用es6语法写demo // 过滤小于20的值,返回布尔值 true 或者 false // 循环数组中的每一个元素 //接受一个函数作为参数,这个函数作为一个累加器,从左到右遍历整个类型数组,最后返回 阅读全文

posted @ 2020-05-01 17:50 大飞_dafei 阅读(108) 评论(0) 推荐(0)