js学习,原型对象
function Dog(name,age) {
this.name=name;
this.age=age;
}
let dog1=new Dog(‘小红’,2);
console.log(dog1);
看到的状态
__proto__下边的
constructor
prototype
constructor
这两个属性在无限循环,老师说这是 原型对象,还是没整明白。

相关文章:

  • 2021-12-15
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-05
  • 2021-07-12
  • 2021-04-19
  • 2021-04-21
  • 2021-04-05
  • 2021-08-24
相关资源
相似解决方案