You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function Foo() {
getName = function () {
console.log('1');
};
return this;
}
Foo.getName = function () {
console.log('2');
};
Foo.prototype.getName = function () {
console.log('3');
};
var getName = function () {
console.log('4');
};
function getName() {
console.log(5);
}
Foo.getName();
getName();
Foo().getName();
getName();
new Foo.getName();
new Foo().getName();
new new Foo().getName();
请问上述代码在浏览器环境下,输出结果是多少?
The text was updated successfully, but these errors were encountered:
在社区发现一道题,已授权,在此分享给大家,随后附作者链接,有什么问题还望指正: ^_^
The text was updated successfully, but these errors were encountered: