随笔分类 -  ES6

浅谈:es6 super
摘要:es6里面class的继承这一章, 对super一些概念上的理解,通过查询网上大神们的见解,来加深自己的理解: class A { constructor() { this.x = 1; } } class B extends A { constructor() { super(); this.x 阅读全文

posted @ 2020-06-07 13:05 文艺小书生 阅读(532) 评论(0) 推荐(0) 编辑

浅谈:export default与export const的区别
摘要:export default与export const的区别 export 用于在JavaScript模块中导出函数,原始值,对象;即导出模块,例如: export (命名导出) export {myFunction}; //命名导出函数 export const value=5; //命名导出原始 阅读全文

posted @ 2020-05-29 23:00 文艺小书生 阅读(13542) 评论(4) 推荐(1) 编辑

浅谈:ES6语法中的解构赋值
摘要:<script>function sum(x, y, z) { let total = 0; if (x) total += x; if (y) total += y; if (z) total += z; console.log(`total:${total}`); // 注意(``)中的`是tab键上方的按键按下产生的,不是单引号}sum(5, "", 9); // total:14funct 阅读全文

posted @ 2020-04-24 18:16 文艺小书生 阅读(194) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示