js遇到这样基础题,看你能不能作对呢

 var a = (function() {
return typeof arguments;
})();
alert(a); //Object var b = (function(x) {
delete x;
return x;
})();
alert(b); //undefined
//**********************
var f = function g() {
return 23;
typeof g();
}
alert(f); //function。。。。
//********************************
var y=1, x = y = typeof x;
x;
alert(x);//undefined
alert(x = y = typeof x);//string
//********************************
var g = (function f(f) {
return typeof f();
})(function() {
return 1;
});
alert(g); //number //**************************************
var foo = { bar: function() {
return this.baz;},
baz: 1
};
var g = (function() {
return typeof arguments[0]();
})(foo.bar);
alert(g); //undefined //****************
var foo = {
bar: function(){ return this.baz; },
baz: 1
}
alert(typeof (f = foo.bar)()); //*********************************************
var f = (function f(){ return "1"; }, function g(){ return 2; })();
alert(typeof f); //number var x = 1;
if (function f(){}) { x += typeof f;
alert(x);
}
alert(x); //1number //alert(function g() {}); //****************************************
function f() {
return f;
}
alert(new f() instanceof f); //false
//*****************************************
var g = (function f(){
function f(){ return 1; }
return f();
function f(){ return 2; }
})(); alert(g); //
//******************************************** var k = (function(foo){
return typeof foo.bar;
})({ foo: { bar: 1 } });
alert(k); //undefined
//******************************************
var x = [typeof x, typeof y][1];
alert(typeof typeof typeof x); //string
//******************************************
with (function(x, undefined){})
alert(length); //
*/ var j = (function(x){
delete x;
return x;
})(1);
alert(j); //

转自:http://perfectionkills.com/javascript-quiz

上一篇:Vertica增加一个数据存储的目录


下一篇:第三天关于网页sip的学习。平台win7 64位 freeSwitch jssip架构web网络电话