js 保留字name 導致的誤解

今天刷到一道題: function Foo(){ this.name="test1"; // 這裏 this 指向實例對象 function bar(){ this.name="test2"; // this 指向 window }; bar(); } Foo.na
相關文章
相關標籤/搜索