获得徽章 0
赞了这篇沸点
Google IO 最新的 《What's New in JavaScript》视频纯文字版:
1. JS 解析快了 2 倍
2. async 执行快了 11 倍
3. 平均减少了 20% 的内存使用
4. class fileds 可以直接在 class 中初始化变量不用写在 constructor 里
5. 私有变量前缀
6. string.matchAll 用来做正则多次匹配
7. numeric operator 允许我们在写数字的时候使用 _ 作为分隔符提高可读性
8. bigint 新的大数字类型支持
9. Intl.NumberFormat 本地化格式化数字显示
10. Array.prototype.flat(), Array.prototype.flatMap() 多层数组打平方法
11. Object.entries() 和 Object.fromEntries() 快速对对象进行数组操作
12. globalThis 无环境依赖的全局 this 支持
13. Array.prototype.sort() 的排序结果稳定输出
14. Intl.RelativeTimeFormat(), Intl.DateTimeFormat() 本地化显示时间
15. Intl.ListFormat() 本地化显示多个名词列表
16. Intl.locale() 提供某一本地化语言的各种常量查询
17. 顶级 await 无需写 async 的支持
18. Promise.allSettled() 和 Promise.any() 的增加丰富 Promise 场景
19. WeakRef 类型用来做部分变量弱引用减少内存泄露
展开
6
前端技术专家 @微博 m.weibo.cn