__proto__ 和 prototype 的关系

__proto__ 是每个对象都有的属性;prototype是构造函数的属性;他们指向的是同一个对象。

例如:

function F(){};

var f = new F();

f.__proto__ === F.prototype  //true



JS原型链详细图解

相关文章:

  • 2021-10-16
  • 2021-10-17
  • 2021-09-22
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-01-18
  • 2021-10-29
  • 2022-12-23
  • 2021-12-16
  • 2021-08-18
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案