<sectionid="description"> Cuando un objeto hereda su <code>prototype</code> de otro objeto, sino que también hereda el <code>supertype</code> propiedad constructor 's. Aquí hay un ejemplo: <blockquote> función Bird () {} <br> Bird.prototype = Object.create (Animal.prototype); <br> dejar pato = nuevo pájaro (); <br> duck.constructor // function Animal () {...} </blockquote> Pero el <code>duck</code> y todos los casos de <code>Bird</code> deberían mostrar que fueron construidos por <code>Bird</code> y no por <code>Animal</code> . Para hacerlo, puedes establecer manualmente <code>Bird's</code> propiedad <code>Bird's</code> constructor de <code>Bird</code> objeto <code>Bird</code> : <blockquote> Bird.prototype.constructor = Bird; <br> duck.constructor // function Bird () {...} </blockquote></section>
<sectionid="instructions"><code>duck.constructor</code> el código para que <code>duck.constructor</code> y <code>beagle.constructor</code> devuelvan sus respectivos constructores. </section>