[JSmentor] Array push

看板Ajax作者 (沉默是金。)時間14年前 (2011/03/22 23:43), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《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)
文章代碼(AID): #1DYCErNR (Ajax)
文章代碼(AID): #1DYCErNR (Ajax)