Skip to content

Instantly share code, notes, and snippets.

@jaspervalero
Last active August 29, 2015 14:17
Show Gist options
  • Save jaspervalero/932c78fbbbede43d5082 to your computer and use it in GitHub Desktop.
Save jaspervalero/932c78fbbbede43d5082 to your computer and use it in GitHub Desktop.
Multi-line String Concatenation In ES5
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