Understanding the difference between .prototype and .__proto__ in JavaScript

Share this video with your friends

Send Tweet

It can be confusing to understand when and how the .prototype and .proto properties are created and used. They both seem to imply having something to do with prototypal inheritance. This is true but possibly not how you think. We'll review each of these properties' role within prototypal inheritance and how they are used in everyday code.

Phily Austria
Phily Austria
~ 5 years ago

Could you please explain why prototype property is not existed when we declare a function with arrow function? Thank you.

Michael Kornelakis
Michael Kornelakis
~ 5 years ago

It's stated that by design arrow functions don't have a prototype property

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

Daiki Maeno
Daiki Maeno
~ 5 years ago

If anybody is also wondering like me, what is "Dunder " ? It short for “Double Under (Underscores)”.

Will Johnson
Will Johnson
~ 5 years ago

If anybody is also wondering like me, what is "Dunder " ? It short for “Double Under (Underscores)”.

yes Daiki, it's short for double underscore