浏览 1553 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-02-17
最后修改:2009-02-18
1:
bop = [4,5,6,5,6, foo]; // bop contains a nested Array dojo.indexOf(bop, foo); //5, because (a reference to) foo is contained in bop dojo.indexOf(bop, [1,2,3]); //-1, because foo is not the same object as [1,2,3] 2: var a = new Array(1,2,3,...); //A lot of extra typing for very little purpose a.forEach(function(x) {console.log(x);}); //approach one //A lot less typing so that you can get work done quickly a.forEach("console.log(item)"); //approach two 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |