title: Javascript class "Object has no method error"
body: <p>I have a class called question . I am trying to call this display method from another class by creating its correspoding object. But I get this error. Will be glad if you can help me with this. </p>
  
  <pre><code>///////////////QUESTION///////////////
  function Question(id, text){
      this.id = id;
      this.text = text;
  }
  
  function QType1(id, text, choices, answers){
  //this is true or false
      Question.call(this, id, text) ;
      this.choices = choices;
     this.answers = answers;
  }
  
  QType1.prototype = new Question();
  
  //inherit Question
  QType1.prototype.constructor = QType1;
  
  QType1.Display = function(){
      console.log("Display Question");
  }
  
  ///////////////QUIZ//////////////////
  function quiz(){}
  
  quiz.prototype.SetHomeScreen = function(x,y){
      var svgCanvas = CreateCanvas(x,y);
      AddText(svgCanvas,100,50, quiz_input.Settings.Layout.Text);
      console.log("Text Added");
      start_but = AddStartButton(svgCanvas, 300, 250);
      console.log("start button Added");
      start_but
      .on("click", function(d,i) {
                              startquiz();
                                  });
      var startquiz = function(){
          console.log(this);
          quiz.prototype.StartQuiz();
      };
  
  }
  
  quiz.prototype.question_objs = [];
  quiz.prototype.user_ans = [];
  quiz.prototype.corr_ans = [];
  
  quiz.prototype.LoadQuestions = function(){
      for(var i=0, l=questions.length; i&lt;l; i++){
             this.question_objs.push(new QType1(questions[i].id, questions[i].settings.text, questions[i].settings.choices, questions[i].settings.answers));
          }
      console.log(this.question_objs);
  }
  
  quiz.prototype.DisplayQuestions = function(){
      var i = 0;
      var l = this.question_objs.length;
      while(i &lt; l){
          console.log(this.question_objs[i] instanceof QType1);
          this.question_objs[i].Display();
      }
  
  }
  quiz.prototype.StartQuiz = function(){
          quiz.prototype.LoadQuestions();
          console.log("Starting Quiz");
          quiz.prototype.DisplayQuestions();
  }
  </code></pre>
  
  <p>The Error Message which I get is.
  <img src="https://i.stack.imgur.com/MsfE3.png" alt="enter image description here">
  Thanks in Advance</p>