title: place javascript in html5 in external file
body: <p>In html5 how do i place the class below (constructor and method)in another file and reference it in the html file.</p>
  
  <p>Below I have everything in 1 file and I dont want that.</p>
  
  <pre><code>  &lt;canvas id="myCanvas" width="600" height="400"&gt;&lt;/canvas&gt;
  &lt;script&gt;
    var canvas = document.getElementById('myCanvas');
    var ctx = canvas.getContext('2d');
    ctx.font="14px Arial"; 
  
  
  
    //how to move to other file
    function ClassPerson(gender,name1) {
        var aa;
        this.gender=gender;
        this.name1=name1;
        aa=6;
  
    };
  
     //how to move to other file
    ClassPerson.prototype.m_sayGender = function()
      {
      ctx.fillText("this gender= " + this.gender + " gender=" + this.name1,10,40);
      };
  
      //stay in this file
    var person1 = new ClassPerson('male','dave');
    var person2 = new ClassPerson('female','bet');
    ctx.fillText("this gender= " + person1.gender,10,20);
    person1.m_sayGender();
    myObject._three();
  
  &lt;/script&gt;
  </code></pre>