Open CyanSalt opened 5 years ago
path: non-compliant-babel
Symbol
typeof
const s = Symbol() console.log(s === Object(s), typeof Object(s))
执行结果:
// Node 10.13 false "object" // Node 0.10 + babel-runtime@6.26.0 true "symbol"
补充:这一差距是无法实现的,参见 http://www.ecma-international.org/ecma-262/#sec-object-constructor ,Object 转换的过程没有调用非内部方法
path: non-compliant-babel
1.
Symbol
类的实例与typeof
执行结果:
补充:这一差距是无法实现的,参见 http://www.ecma-international.org/ecma-262/#sec-object-constructor ,Object 转换的过程没有调用非内部方法