title: how to use the method correctly in js?
body: <pre><code>&lt;script&gt;
  function Person(gender) {
    this.gender = gender;
  }
  
  Person.prototype.sayGender = function()
  {
    alert(this.gender);
  };
  
  var person1 = new Person('Male');
  var genderTeller = person1.sayGender;
  genderTeller(); 
  &lt;/script&gt;
  </code></pre>
  
  <p>Question:</p>
  
  <p>It shows 'undefined'. what is the problem with the script?</p>