Conclusión: Este constructor y el prototipo método "este" punto, entonces el método constructor de la instancia de objeto, el constructor de este punto constructor
Ejemplo:
Persion de función (opciones) {
This.Name = "张三";
console.log (esto)
this._init (opciones)
}
Persion.prototype._init = function () {opciones
console.log (esto)
this.age = options.age || '10';
}
Persion. $ Encendido = function () {
console.log (esto)
esto. $ emiten (8)
}
Persion. $ Emiten = function (num) {
console.log (num)
}
var zhangsan = new Persion ({edad: 56}) // {nombre: "Joe Smith"} // {nombre: "Joe Smith", edad: 45}
Persion $ en (.); // Persion (opciones) {This.Name = "张三"; console.log (este) this._init (opciones)} // 8