我的问题是:
function Foo() { this.foo = "bar"; // <- What is "this" here? }
从我可以告诉它取决于如何Foo使用,即作为构造函数或函数.什么可以this在不同的情况下?
Foo
this
javascript function this
function ×1
javascript ×1
this ×1