1. (function () {
Return typeof arguments
})();
when returned here is the argument type, it is an array of classes, also on the object, so is object, exactly who is [object Argumens]
2
var f = function g () {
return 23;
};
typeof G ();
The problem is named function expression, but function name G only in the name scope valid, so the result is wrong, notice that the subject in the old IE is resolved to function declaration, that is, the result is number;
3
(function (x) {
Delete x;
return x;
}) (1);
Delete Deletes object properties, so this returns to 1;
4
var y = 1, x = y = typeof x;
X
It's obvious that undefined
5
(function f (f) {
Return typeof F ();
}) (function () {return 1;});
Number
6
var foo = {
Bar: function () {
return This.baz;
},
Baz:1
};
(function () {
Return typeof Arguments[0] ();
}) (Foo.bar);
Answer: undefined;
7
var foo = {
Bar:function () {
return This.baz;},
Baz:1}
typeof (F = foo.bar) ();
The subject is dead, the answer undefined, notice that the object only holds a reference to the method and does not hold the method
8
var f = (
function f () {
return "1";
},
function g () {
return 2;
}
)();
typeof F;
The answer is number;
9
var x = 1;if (function f () {}) { x + = typeof F;} X
1undefined
10
var x = [typeof x, typeof y][1];typeof typeof X;
X is undefined
The type of x is a string;
11
(function (foo) { return typeof Foo.bar;}) ({foo: {bar:1}});
It is obvious that undefined;
12
(function f () { function f () {return 1;} return f (); function f () {return 2;}}) ();
The answer is 2, the variable promotion principle
13
function f () {return F;} New F () instanceof F;
False
14
With (function (x, undefined) {}) length;
Return when he arguments the length of the
On the collation of 14 Devil JS questions