http://sentsin.com/
Although today's JavaScript has been leaps and bounds, but JS's many features are still retained, the following topics are not intentionally set pits, many places will verify your JS, if the wrong half, please do not tell me that you are engaged in the front.
- 1.
(function () { return typeof arguments;}) ();
- "Object"
- "Array"
- "Arguments"
- "undefined"
- 2.
var f = function g () {return 23;};
typeof g ();
- "number" /label>
- "undefined"
- "function"
- error
- 3.
(function (x) {delete x; return x;})
(1);
- 4.
var y = 1, x = y = typeof x;x;
- 1
- "number"
- Input id= "answer-4-3" type= "Radio" name= "question-4" > undefined
- " undefined "
- 5.
(function f (f) {return typeof F ();})
(function () {return 1;});
- "number" /label>
- "undefined"
- "function"
- error
- 6.
var foo = {bar:function () {return this.baz; }, Baz:1};(function () {return typeof arguments[0] ();})
(foo.bar);
- "undefined "
- " object "
- "number"
- "function"
- 7.
var foo = {bar:function () {return this.baz;
}, baz:1}typeof (f = foo.bar) ();
- "undefined "
- " object "
- "number"
- "function"
- 8.
var F = (function f () {return "1"; }, function g () {return 2;
}); typeof F;
- "string" /label>
- "number"
- "function"
- "undefined"
- 9.
var x = 1;if (function f () {}) {x + = typeof F;}
x;
- 1
- "1function"
- Input id= "answer-9-3" type= "Radio" name= "question-9" > "1undefined"
- nan
- Ten.
var x = [typeof x, typeof y][1];typeof typeof X;
- "number"
- "string"
- "undefined"
- "object"
- one.
(function (foo) {return typeof Foo.bar;})
({foo: {bar:1}});
- "undefined "
- " object "
- "number"
- error
- 12.
(function f () { function f () {return 1;} return f (); function f () {return 2;}}) ();
- 1
- 2
- Error (e.g. "Too much recursion")
- undefined
- 13.
function f () {return F;} New F () instanceof F;
- 14.
With (function (x, undefined) {}) length;
Study questions: How do I change the typeof type of undefined? (that is, typeof undefined or typeof (undefined) are not "undefined")
[Go] Test your javascript.