prototype 和__proto__

    var person = {
        username: "xxx"
    }
    var yellowPerson = {
        __proto__: person //内部原型 增强的字面量
    }
	console.log(yellowPerson.username);
	console.log(yellowPerson);
	console.log(yellowPerson.__proto__);

prototype 和__proto__

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-08-14
  • 2021-07-13
  • 2021-12-26
猜你喜欢
  • 2021-04-16
  • 2021-07-25
  • 2021-12-22
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案