0

What is the prototype ?!

help

18th Mar 2018, 11:58 AM
Nwras
5 Respostas
0
@visph That was oop in general. BTW , thanks for spotting it.
18th Mar 2018, 12:33 PM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 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
18th Mar 2018, 12:31 PM
visph
visph - avatar
+ 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.
18th Mar 2018, 12:09 PM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 1
😊😍😍
18th Mar 2018, 12:49 PM
Nwras
+ 1
Thank's
18th Mar 2018, 12:49 PM
Nwras