From fb865e82b49ef56bd8bce37f38e9f563c035fa7a Mon Sep 17 00:00:00 2001 From: maciej-gurban Date: Tue, 10 Dec 2013 14:54:14 +0200 Subject: [PATCH] changes to how strings are concatenated --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 524ca73f74..233e755c20 100644 --- a/README.md +++ b/README.md @@ -207,12 +207,13 @@ // good - var errorMessage = 'This is a super long error that ' + - 'was thrown because of Batman. ' + - 'When you stop to think about ' + - 'how Batman had anything to do ' + - 'with this, you would get nowhere ' + - 'fast.'; + var errorMessage = + 'This is a super long error that ' + + 'was thrown because of Batman. ' + + 'When you stop to think about ' + + 'how Batman had anything to do ' + + 'with this, you would get nowhere ' + + 'fast.'; ``` - When programatically building up a string, use Array#join instead of string concatenation. Mostly for IE: [jsPerf](http://jsperf.com/string-vs-array-concat/2).