title: Javascript: How to include a url in a string variable?
body: <p>new to this javascript thing. This is driving me crazy! </p>
  
  <p>How do I add a URL in a string variable? </p>
  
  <p>This is what I have:</p>
  
  <pre><code>function getRiskMessage(){
  
      var msg = " visit our advice website at &lt;a href=\'http://www.example.com\'&gt;this site&lt;/a&gt;";
  
      if(totalRiskScore &gt; 25){
          //this message (High Risk)
  
          msg2  = show();
  
  
      }//close if
  
      return msg;
  
  }
  </code></pre>
  
  <p>but when i output it to a div instead of a link 'this link' - I get the a tag and url as string like above.</p>
  
  <p>What am I doing wrong, need to understand this. </p>