标签:for ar sp new c 对象 jquery bs r
Array:
新建:var ary = new Array(); 或 var ary = [];
增加:ary.push(value);
删除:delete ary[n];
遍历:for ( var i=0 ; i < ary.length ; ++i ) ary[i];
Object:
新建:var obj = new Object(); 或 var obj = {};
增加:obj[key] = value; (key为string)
删除:delete obj[key];
遍历:for ( var key in obj ) obj[key];
标签:for ar sp new c 对象 jquery bs r
原文地址:http://my.oschina.net/guomingliang/blog/307467