News for hackers. Stuff that matters.
Re:JavaScript Tips by FlemishBeeCycle on Thursday May 06, 2010 @05:33AM (#1323998)
In most modern browsers Array.join and += are about equal in performance for most use cases. Depending on the length of the strings and/or the number of segments joined - performance varies. Wouldn't worry too much about it.
Re:JavaScript Tips by axod on Thursday May 06, 2010 @05:44AM (#1324008)
Agreed. I just tested performance and the difference was moot. I'd say += is easier to read so unless you're doing something really heavy duty with strings I wouldn't worry.