Click here to Skip to main content
15,314,644 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I know that in javascript prototype is both object and property. But what I want to know is when to use prototype as object and when to use prototype as property?

What I have tried:

I tried to get the explanation for prototype behaviour in javascript
Posted
Updated 5-Jan-22 22:46pm

1 solution

Object prototypes - Learn web development | MDN[^]
Inheritance and the prototype chain - JavaScript | MDN[^]

NB: Unless you're using an ancient Javascript engine, you should probably be using ECMAScript 2015 classes[^] instead.
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900