title: how to insert an html link into an array string?
body: <p>a bit confused here. I have an array that's full of answers to questions and am having trouble getting the link to appear as.. an actual link. I've tried document.write but it's just breaking my page. Any ideas?</p>
  
  <pre><code>this.answer = [
      'answer1' + '&lt;a href="URL"&gt;click here&lt;/a&gt;',
      'answer 2', 
      'answer 3'
  ]
  </code></pre>
  
  <p>I have no idea how to write the <code>&lt;a href="URL"&gt;click here&lt;/a&gt;</code> bit to get it to not appear as just a string of text instead of HTML. Any ideas? My array is in a Shadow DOM custom HTML5 element, also. I know how to target the shadow DOM, just not sure of the basic format..</p>
  
  <p>Thanks!
  - Shan</p>
  
  <p><strong>edit:</strong> Thanks for the response, mplungjan. Like this?</p>
  
  <pre><code>this.answer = [
      'answer1' + innerHTML('&lt;a href="URL"&gt;click here&lt;/a&gt;'),
      'answer 2', 
      'answer 3'
  ]
  </code></pre>
  
  <p>this makes the entire thing appear blank on my page, however.. Think I'm formatting it wrong</p>
  
  <p><strong>edit 2</strong> okay trying to fix it based on the answers I got.. I tried this:</p>
  
  <pre><code> var insertThis = document.getElementById('myElement').innerHTML = '&lt;a href="#"&gt;Click here&lt;/a&gt;';
  
   this.answer = [
      'answer1' + insertThis,
      'answer 2', 
      'answer 3'
  ]
  </code></pre>
  
  <p>but it's still making my array totally blank :( sorry I am pretty new to arrays it is very confusing to me.. Do i need to put the entirety of my first array item in the innerHTML including the 'answer1' bit?</p>
  
  <p><strong>edit</strong> it says that I cannot set innerHTML of null.. but when I console log my element right before I get the element by id it logs it fine.. hmm</p>