0
What is the prototype ?!
help
5 Respostas
0
@visph That was oop in general.
BTW , thanks for spotting it.
+ 4
@cHiRaG GhOsH wrote: << In Object Oriented programming , this model is called class >>
That's the case for OOP languages based on class. But in JS, OOP is first based on "prototype" paradigm ( even if last evolutions of JS provide "class" keyword as sytaxic sugar to help programmers accustomed to "class" paradigm ) ;)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype
+ 3
Prototype in basic terms is a "model".
Suppose a car company wants to release a new car. For that , they dirst make a small model of that car also called prototype. In Object Oriented programming , this model is called class.
The real cars are made having the same features as that of the model. These real cars are called objects in programming.
+ 1
😊😍😍
+ 1
Thank's