Whilst reading a comment by Mike DeBoer on Ajaxian about delimiting JavaScript strings with backslashes, I thought it’s worth mentioning it here as well, if only to remind myself.
String concatenation always creates a new string.
Thus, writing:
1 2 3 | |
is slower & more memory intensive than writing:
1 2 3 | |
Just be careful you don’t have trailing spaces as that will mess it up.