I think the guideline to use Array.join for string concatenation should be removed. I know performance is sighted as the reason, but this smells of premature optimization to me. In real world use cases, the performance difference is insignificant.
For example, on my machine (in Chrome), concatenating 1000 items is so fast with both methods (traditional concat and Array.join()) that it is unmeasurable (< .5 msec). Even at 10,000 items the traditional concat only takes just 1-2 msec which is an insigificant amount of time.
Array.join() and traditional concatenation with "+" should both be acceptable in our standards. The method chosen in any given situation should be the method that conveys the code's intent most clearly to the reader.
(BTW, I'll double-check performance on IE as soon as I can, but I'm guessing the outcome for real-world use cases will be similar)
I think the guideline to use Array.join for string concatenation should be removed. I know performance is sighted as the reason, but this smells of premature optimization to me. In real world use cases, the performance difference is insignificant.
For example, on my machine (in Chrome), concatenating 1000 items is so fast with both methods (traditional concat and Array.join()) that it is unmeasurable (< .5 msec). Even at 10,000 items the traditional concat only takes just 1-2 msec which is an insigificant amount of time.
Array.join() and traditional concatenation with "+" should both be acceptable in our standards. The method chosen in any given situation should be the method that conveys the code's intent most clearly to the reader.
(BTW, I'll double-check performance on IE as soon as I can, but I'm guessing the outcome for real-world use cases will be similar)