随笔分类 - ES6
摘要:在线转换工具 https://babeljs.io/repl // es6 class Person { name = 'lisi' static age = null #sex = null constructor() { this.name = 'zhangsan' } set() { this
阅读全文
摘要:ES6判断一个数组是否包含另一个数组 function arrHasOtherArr(arr, arr1) { return arr1.every(item => arr.includes(item)) } arrHasOtherArr([1,2,3], [1,2,3]) // true arrHa
阅读全文
摘要:let和const命令 模板语言 模板语言使用一对``来表示 let a = ` console.log(a) console.log(a) console.log(a) ` console.log(a) // 原样输出 模板语言使用变量 let b = 10 let str = console.l
阅读全文