The JS prototype constructor points to the constructor

is not very good at expressing, for example:

function Person () {

}

Why does the constructor in Person"s prototype prototype point to Person ()? I don"t know much about it and I don"t find any answers on the Internet.

Dec.10,2021

  1. constructor, prototype and prototype chain
  2. 33 concepts that JavaScript developers should understand

  

every time a function is created, its prototype object is created at the same time, and this object also automatically gets the constructor property.
so Person.prototype.constructor itself points to Person, because you need to specify it manually because you rewrite the original constructor override

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e42724-59a04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e42724-59a04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?