摘要: enum Type{ color=1, mood=2, } 有且仅有数字枚举成员还获得从枚举值到枚举名称的反向映射。即以下写法为合法的: Type["color"] = 1 与 const x = 1 Type[x] = "color" 注意:请记住,字符串枚举成员根本不会生成反向映射。 阅读全文
posted @ 2021-11-10 15:09 亦茫茫 阅读(365) 评论(0) 推荐(0) 编辑
摘要: <script> const p = new Promise(((resolve, reject) => { setTimeout(() => { console.log('hello world') resolve("hi") // reject("err") }, 1000) })) // th 阅读全文
posted @ 2021-11-10 11:24 亦茫茫 阅读(28) 评论(0) 推荐(0) 编辑