title: javascript function errors when trying to return a value
body: <p>My Goal:  I am writing a widget for a job which will populate a div with contents.  I dont even get to execute the information as get the error:
         Uncaught Syntax Error:  Unexpected Token Return</p>
  
  <p>I wrote an object which executes this function as follows:</p>
  
  <pre><code>function TreeView(){
      this.rebuild = contructRoot();
  }
  
  function constructRoot(){
      var resultant = ajax_Request();
      var content = $(resultant);
  
      var root = $("&lt;div&gt;");
      var root_nodes = ajax_Request("/startTreeAJAX");
      root_nodes.split("|");
      root.html(
          $("&lt;div&gt;").html(
              $("&lt;ul&gt;").append($('&lt;li&gt;').html(root_nodes[0])).append($("&lt;li&gt;").html(root_nodes[1]))
          )
      );
      root.find("li").click(function(){
          clickExpand(this);
      });
  
      return root.html();
  }
  </code></pre>
  
  <p>I am trying to essentially return the elements contents.</p>