title: How do I assign a HTML string over multiple lines in Javascript?
body: <p>I have to assign an HTML string through the following Javascript code. However, this seems to be possible only if I put all the HTML on one line.</p>
  
  <p>This works:</p>
  
  <pre><code>var assignedhtml = "&lt;div&gt; &lt;p&gt;It's the most beautiful thing I've seen in my life &lt;/p&gt; &lt;p&gt; It's watermalone &lt;/p&gt; &lt;/div&gt;"
  </code></pre>
  
  <p>This does not work:</p>
  
  <pre><code>var assignedhtml = "&lt;div&gt;
                      &lt;p&gt;It's the most beautiful thing I've seen in my life &lt;/p&gt;
                      &lt;p&gt; It's watermalone &lt;/p&gt;
                      &lt;/div&gt;"
  </code></pre>
  
  <p>The issue is that I have too many lines my html code. In the past, I have individually removed all the <code>\n</code> (newline) characters. Is there a simpler way to achieve the variable assignment I intend without having to individually go through the lines and delete the newline characters?</p>
  
  <p>i.e., I want to keep the html code on the right as is in the second case above, but remove the newlines before assigning it to the variable.</p>