This question already has an answer here:
- Creating multiline strings in JavaScript 28 answers
I declare a string of HTML and set it equal to a variable. I can't think of any reason it would generate an error, yet here it is:
Uncaught SyntaxError: Unexpected identifier on Ln 136.
Ln 136: new_comment = '
<li class="photobooth-comment">
<span class="username">
<a href="#">You</a>
</span>
<span class="comment-text">
' + text + '
</span>
<span class="comment-time">
2d
</span>
</li>
';