Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: 'pushing' vs direct array assignment ? Date: Mon, 3 Jun 2013 13:59:44 -0600 Lines: 26 Message-ID: X-Trace: individual.net SPAfteiTdOMRz8pPgNFqAwuv4nflh814dIyNtVHW8id48VZY8j Cancel-Lock: sha1:KZ7jbSYo5xu+vHZ/GGfJQtZMPuw= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:20129 Hi: I build an array in JS that can be from 9 elements thru to nearly 1500 elements I also build a 2-property object to be placed in each of these elements: The object to be saved in the array is : nuobj = {vrbl1: "vrbl1value", vrbl2: "vrbl2value" } // to add this object to this (possibly very big) array should I use the 'push' method : anames.push(nuobj) ; // or should I use direct array assignment anames[anames.length] = nuobj ; or, is there another preferred way to do this quickly ? Thank you. -- Mel Smith