Prototype vs __proto__ Javascript interview question

Publicado el: 05 octubre 2023
en el canal de: code savera
705
12

Prototype is only accessible on constructors, while dunder proto is only accessible on instances.

"The function 'Person' on the screen is a constructor function that has a 'fullName' method defined on its prototype."

"When creating an instance, 'person1,' the prototype of the 'Person' constructor becomes linked to the dunder proto of the 'person1' instance."
//run the code

"And because of this linkage, we can now access the 'fullName' method of the constructor's prototype from the 'person1' instance."


En esta página del sitio puede ver el video en línea Prototype vs __proto__ Javascript interview question de Duración hora minuto segunda en buena calidad , que subió el usuario code savera 05 octubre 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 705 veces y le gustó 12 a los espectadores. Disfruta viendo!