title: Multi line output in JS
body: <p>I would like to add multiple lines of code to "myContent1" without having to replicate it as this can be quite tedious. Is there a more efficient way? Thanks!</p>
  
  <pre><code>function getCode(form){
      myContent1 = document.inputForm.myContent1.checked;
      output =
          '&lt;!DOCTYPE html&gt;\n' +
          '&lt;html&gt;\n' +
          '&lt;body&gt;\n' +
          ((myContent1) ? '&lt;div&gt;content 1&lt;/div&gt;' : '') + '\n' +
          ((myContent1) ? '&lt;div&gt;content 2&lt;/div&gt;' : '') + '\n' +
          '' +
          '&lt;\/body&gt;\n' +
          '&lt;\/html&gt;\n';
      document.inputForm.source.value = output;
      return output;
  }
  </code></pre>