title: How to get html to print return value of javascript function?
body: <p>What is the preferred syntax to get html to print return value of javascript function?</p>
  
  <pre><code>function produceMessage(){
      var msg= 'Hello&lt;br /&gt;';
      return msg;
  }
  </code></pre>
  
  <p>EDIT: Yikes, too many answers without me clarifying what I meant.  I know how to do it via the script tag.  However, let's say I wanted to make the message red.  Would I just encase the script tag inside my css like so?</p>
  
  <pre><code>&lt;div style="color:red&gt;&lt;script&gt;document.write(produceMessage())&lt;/script&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I guess my main question was, should you be using document.write to get the return values to print?</p>