title: For some reason its giving me undefined undefined undefined inthis code
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class cars {
    construtor(name, color, type) {
      this.name = name;
      this.color = color;
      this.type = type;
    }
  
    brand(br) {
      console.log(this.name + " " + this.color + " " + this.type)
    }
  }
  const type1 = new cars("ferrari", "red", "Automatic");
  console.log(type1)
  
  type1.brand()
  
  class cars2 extends cars {
    ask(text) {
      this.brand(text)
    }
  
  }
  
  const type2 = new cars2("BMW", "Blue", "Automatic")
  type2.ask()</code></pre>
  </div>
  </div>
  </p>
  <p>so i wanted it to give out the following things i wrote in consts but it gives me undefined 3 times on both.</p>