class Obj { static log(){ console.log(this) } } var test = Obj.log Obj.log() // class Obj test() // undefined
这是我运行的代码没有 'use strict'.结果我不明白.为什么函数会test记录undefined而不是全局对象?
test
undefined
javascript class this
class ×1
javascript ×1
this ×1