摘要:
先看看一个简单的代码 var str='Hello World'; alert(str);//弹出 Hello World 再看一段代码: var v='Hello World'; (function(){ alert(v); })() //和我们预期的一样,还是弹出 Hello World 那么铺 阅读全文
摘要:
//arguments对象并不是一个数组,但是访问单个参数的方式与访问数组元素的方式相同 function show(){ console.log(arguments); //arguments.push(5); //此时报错arguments.push is not a function } show(1,2,3,4); //在js中 不需要明确指出参数名,就能访问它们,... 阅读全文