Logo

Programming-Idioms

History of Idiom 48 > diff from v33 to v34

Edit summary for version 34 by programming-idioms.org:
New JS implementation by user [programming-idioms.org]

Version 33

2017-10-01, 11:26:47

Version 34

2017-10-01, 11:28:01

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Extra Keywords
multiline raw
Extra Keywords
multiline raw
Code
let s = `This is a very long string which needs 
to wrap across multiple lines because 
otherwise my code is unreadable.`;
Comments bubble
ES6 so-called "template literals".
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Template_literals