Tutorial Multiline String Variables in JavaScript
by Unknown in javascript , Tutorial 0
This works:
var htmlString = "<div>This is a string.</div>";
This fails:
var htmlSTring = "<div>
This is a string.
</div>";
Sometimes this is desirable for readability.
Add backslashes to get it to work:
var htmlSTring = "<div>\
This is a string.\
</div>";