ES-2015 multiline and template strings
The previous example showed two of the new features introduced with ES-2015, multiline and template strings. The feature is meant to simplify our life while creating text strings.
The existing string representations use single quotes and double quotes. Template strings are delimited with the backtick character that's also known as the grave accent (or, in French, accent grave):
`template string text`
Before ES-2015, one way to implement a multiline string was this construct:
["<html><head><title>Hello, world!</title></head>", "<body><h1>Hello, world!</h1>", "<p><a href='/osinfo'>OS Info</a></p>", "</body></html>"] .join('\n')
Yes, this is the code used in the same example in previous versions of this book. This is what we can do with ES-2015:
`<html><head><title>Hello, world!</title></head> <body><h1>Hello, world!</h1> <...