作者TonyQ (沉默是金。)
看板Ajax
标题[JSmentor] Array push
时间Tue Mar 22 23:43:46 2011
※ 引述《TonyQ (沉默是金。)》之铭言:
: 这个 google group 讨论蛮有深度的,而且文章内容高手辈出,
: 对英文有自信而且想深入了解 javascript 的人强烈推荐订来看看。:P
: http://groups.google.com/group/jsmentors?hl=en&pli=1
http://goo.gl/6vgWU
Here we have a discussion for push behavior for array.
It's all about performance.
var k =[];
k.push() vs k[k.length]
And the one I mentioned.
k.push(1,2,3,4,5) vs
k.push(1);
k.push(2);
k.push(3);
k.push(4);
k.push(5);
But it's more complicated with the giving case in real word,
it's worth to read if you haven't learned about the push of array.
--
我:一半的日子让你说,我听你说你的所有
______________________________________
______________________________________一半的日子我想说,对你说过去的所有:我
_______________________________________________________
在讨论中妥善扮演兼具聆听与分享的角色,是我们一生的课题。
_______________________________________________________
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 198.203.175.175
※ 编辑: TonyQ 来自: 198.203.175.175 (03/22 23:51)