Difference between 'new person()' and 'prototype.person' in prototype chaining?

前端 未结 0 1780
别跟我提以往
别跟我提以往 2020-12-19 18:35
var person = function (name) { 
  this.myName = name;
}
person.prototype.tellMyName = function () {
  console.log(this.myName);
}

var person1 = function (name,age)          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题