javascript 小代码

时间:2024-09-09 17:33:32
if(!("a" in window)){
var a =1;
}
alert(a);
//undefined var a = 1,b=function a (x){
x && a (--x);
};
alert(a);
//1 function a(x){
return x*2;
}
var a ;
alert(a);
//函数a function b (x, y, a) {
arguments[2] = 10;
alert (a);
}
b(1, 2, 3);
//10 function a () {
alert (this);
}
a.call (null);
//[object Window]

  不测试还真不一定对.