Prototype vs __proto__ Javascript interview question

Veröffentlicht am: 05 Oktober 2023
auf dem Kanal: 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."


Auf dieser Seite können Sie das Online-Video Prototype vs __proto__ Javascript interview question mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer code savera 05 Oktober 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 705 Mal angesehen und es wurde von 12 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!