Created
September 25, 2011 11:37
-
-
Save flipflop/1240523 to your computer and use it in GitHub Desktop.
JavaScript Multi-line String Concatenation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// old way | |
var myOldString = "some really long text repeated" + | |
some really long text repeated" + | |
some really long text repeated"; | |
// Potentially better for Performance and Memory usage | |
var myString = "some really long text repeated\n\ | |
some really long text repeated\n\ | |
some really long text repeated"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment