1: var a = 111111111111111110000,
b = 1111;
a + b;
2: 5 == [5];
3: function foo(){
};
foo.name = "honghong";
foo.name
4:
"use strict";
function foo(a) {
var a;
return a;
}
function bar(a) {
var a = ‘bye‘;
return a;
}
console.log(foo(‘hello‘));
console.log(bar(‘hello‘));
5:
function Foo() {
getName = function () {
alert (1);
};
return this;
}
Foo.getName = function () { alert (2);};
Foo.prototype.getName = function () { alert (3);};
var getName = function () { alert (4);};
function getName() { alert (5);}
Foo.getName();
getName();
Foo().getName();
getName();
new Foo.getName();
new Foo().getName();
new new Foo().getName();
时间: 2024-08-26 05:14:40