![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
es6
文章平均质量分 76
丹丹的小跟班
这个作者很懒,什么都没留下…
展开
-
WeakMap
WeakMap原创 2023-12-05 13:16:59 · 262 阅读 · 0 评论 -
es6函数拓展
函数参数的扩展 1.默认参数 function fn(a, b = 10) { console.log(a, b) } fn(10) //10 10 只有在未传递参数,或者参数为 undefined 时,才会使用默认参数,null 值被认为是有效的值传递。 function fn(a, b = 10, c = 10) { console.log(a, b, c) } fn(10, undefined, null) //10 10 null 函数参数默认值存在暂时性死区,在函数参数默认原创 2021-07-16 09:44:11 · 67 阅读 · 0 评论 -
es6数值拓展
数值的表示 二进制表示法新写法: 前缀 0b 或 0B 。 console.log(0b11 === 3); // true console.log(0B11 === 3); // true 八进制表示法新写法: 前缀 0o 或 0O 。 console.log(0o11 === 9); // true console.log(0O11 === 9); // true 常量 Number.EPSILON 属性表示 1 与大于 1 的最小浮点数之间的差。 它的值接近于 2.2204460492503130原创 2021-07-15 16:47:24 · 80 阅读 · 0 评论