上一页 1 ··· 4 5 6 7 8
摘要: 1.对象字面变量 2.对象解构,...运算符 3.name属性 4.特性方法(get、set定义是我方法获取) let descriptor = Object.getOwnPropertyDescriptor(obj,'num')console.log(descriptor.get.name)con 阅读全文
posted @ 2021-08-11 14:46 卷叶小树 阅读(38) 评论(0) 推荐(0)
摘要: 1.类方法 Array.from() 将类数组转数组Array.of() 创建数组 // Array.from() const divs = document.getElementsByTagName('div') Array.from(divs).forEach(v => { console.lo 阅读全文
posted @ 2021-08-10 20:33 卷叶小树 阅读(37) 评论(0) 推荐(0)
摘要: 1.es7 1.1.绑定作用域 context::fn 等价于 fn.bind(context) const divs = document.getElementsByClassName('div') Array.prototype.forEach.bind(divs,function (...ar 阅读全文
posted @ 2021-08-06 13:18 卷叶小树 阅读(56) 评论(0) 推荐(0)
摘要: 1.默认参数 默认参数导致函数在执行时,先执行参数体,再执行函数体 2.箭头函数 无法使用arguments,可通过获取剩余参数的语法代替不能做构造函数作用域是定义时的作用域,箭头函数不受严格模式影响,如果要修改其作用域,将其放到普通函数里箭头函数不能做generator,内部不能使用yeild关键 阅读全文
posted @ 2021-08-06 13:13 卷叶小树 阅读(38) 评论(0) 推荐(0)
摘要: 1.数组-拆分 const arr =[1,2,3,4,5,6,7] const [a,b,...c] = arr console.log(a,b,c) 2.数组-合并 const a = [1,2,3],b = [4,5,6] const c = [...a,...b] console.log(c 阅读全文
posted @ 2021-08-05 18:11 卷叶小树 阅读(194) 评论(0) 推荐(0)
摘要: 1.数组解构 const [a,b,[c,d],e] = [1,2,[3,4],5] 2.元素解构 console.log(...document.getElementsByTagName('div')) 3.实现迭代器接口的数据-解构 const obj = { *[Symbol.iterator 阅读全文
posted @ 2021-08-04 19:37 卷叶小树 阅读(51) 评论(0) 推荐(0)
摘要: 1.具名组 let reg = /(?<year>\d{4})\/(?<month>\d{1,2})\/(?<date>\d{1,2})/ const res = reg.exec('2020/3/23') console.log(res) 2.引用 let str = '10/10/10' let 阅读全文
posted @ 2021-08-04 17:59 卷叶小树 阅读(33) 评论(0) 推荐(0)
摘要: 1.原始值检测 (1)string、number、boolean、undefined、symbol检测使用typeof (2)null检测使用 或!== 2.引用值检测 (1)Date、Error、RegExp等内置js类型和自定义类型用instanceof (2)Function检测:myFun 阅读全文
posted @ 2021-08-03 19:48 卷叶小树 阅读(33) 评论(0) 推荐(0)
摘要: 解决方案:将framework的安装包移动到D盘,磁盘空间不足应该是所在的C盘磁盘空间不足了,换一个盘进行安装即可 阅读全文
posted @ 2021-04-08 17:00 卷叶小树 阅读(263) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8