function Foo(){
bar=function(){console.log(1)};
return this;
}
Foo.bar=function(){console.log(2)}
Foo.prototype.bar=function(){console.log(3)};
var bar = function(){console.log(4)}
function bar(){
console.log(5);
}
new bar();
Foo.bar();
Foo().bar();
bar();
new Foo().bar()
try guess what console?and Why this??I can't understand,in Browser environment。
Aucun commentaire:
Enregistrer un commentaire