Introduction
In JavaScript, there are situations when we wish to create multiline strings. In this article, we'll look at how to do it.
How to create multiline strings in JavaScript
To create multiline strings in JavaScript we can use template literals.
Template literals are a brand-new form of literal introduced by ECMAScript 6 (ES6). Variable interpolation is only one of their many properties, but more significantly for our subject, they may be multiline.
Conclusion
In this article, we learned how to create multiline strings in JavaScript.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}