随笔分类 -  ES6

摘要:在线转换工具 https://babeljs.io/repl // es6 class Person { name = 'lisi' static age = null #sex = null constructor() { this.name = 'zhangsan' } set() { this 阅读全文
posted @ 2023-03-14 18:18 前端之旅 阅读(307) 评论(0) 推荐(0) 编辑
摘要:ES6判断一个数组是否包含另一个数组 function arrHasOtherArr(arr, arr1) { return arr1.every(item => arr.includes(item)) } arrHasOtherArr([1,2,3], [1,2,3]) // true arrHa 阅读全文
posted @ 2021-11-05 18:06 前端之旅 阅读(1804) 评论(0) 推荐(0) 编辑
摘要:let和const命令 模板语言 模板语言使用一对``来表示 let a = ` console.log(a) console.log(a) console.log(a) ` console.log(a) // 原样输出 模板语言使用变量 let b = 10 let str = console.l 阅读全文
posted @ 2020-04-13 17:14 前端之旅 阅读(230) 评论(0) 推荐(0) 编辑

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