/**-------------------------------------------------------------------------------* [email protected] 2017-8-29 19:03*-------------------------------------------------------------------------------* 1. Prototype, constructor are all attributes; * 2. Different points: Prototype is a constructor attribute, an object; * constructor is a new instance property, is a function; * 3. Constructor points to the constructor (constructor); * 4. Constructor is also the attribute of the constructor (prototype); * 5. The __proto__ of the instance points to the constructor prototype; */function Fn () { };var f = new FN (); Console.log (Fn.prototype.constructor = = = fn); Trueconsole.log (f.__proto__ = = = Fn.prototype); Trueconsole.log (F.__proto__.constructor = = = Fn); Trueconsole.log (F.constructor = = = Fn); True
201708291826_ JavaScript prototype, __proto__, constructor ko!!!!!! "