<!doctype html>
<head>
<title>Multi-line JavaScript Strings</title>
</head>
<body>
<div id="var1"></div>
<div id="var2"></div>
<div id="var3"></div>
<script>
/* JS comes here */
var myStr1 = `This is my
multiline String
which is amazing`;
// adding string value to HTML tag
document.getElementById('var1').innerHTML = myStr1;
var myStr2 = "This is my \
multiline String \
using backslash to escape new line";
// adding string value to HTML tag
document.getElementById('var2').innerHTML = myStr2;
var myStr3 = "This is my" +
" multiline String " +
" using concatenation technique";
// adding string value to HTML tag
document.getElementById('var3').innerHTML = myStr3;
</script>
</body>
</html>