Last active
August 29, 2015 14:17
-
-
Save jaspervalero/932c78fbbbede43d5082 to your computer and use it in GitHub Desktop.
Multi-line String Concatenation In ES5
This file contains hidden or 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
function messageUser( prefix, firstName, lastName ) { | |
var message = 'I hope you can read my mind and understand how terrible \ | |
concatenating strings are in the current version of \ | |
JavaScript ' + prefix + ' ' + firstName + ' \ | |
' + lastName + '. There nothing fun about it. Just a \ | |
whole lot of pain and yawn mode'; | |
return message; | |
} | |
messageUser( 'Prof.', 'Charles', 'Xavier' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment