Created
August 12, 2014 12:59
-
-
Save jikeytang/69b6bb017b491534e551 to your computer and use it in GitHub Desktop.
[ Javascript ] - 20140813-题目1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
求出以下表达式的值,为什么? | |
with(function(x, undefined){})length; | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
var fn = function(x, undefined){};
fn.length;
求函数的形参个数
极力不推荐with啊 还不容定义一个变量呢
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看到with顿时一阵菊紧,迅速查证了一番,with是js保留的关键字,目的是减少键盘输入;
可以这么看with(function(x, undefined){})就是里面的这个函数对象,然后输出函数对象的长度,也就是参数的个数;
不建议使用这个关键字,可能会坑自己