+ 6

Can someone please clarify prototype in javascript?

16th Jan 2019, 7:41 PM
Anisha
Anisha - avatar
2 Réponses
+ 6
Prototypes are a way to add functions to a class, for example an "addHours" to the Date class Look at the example to see it in action: https://code.sololearn.com/W66XL2Ks9QjN/?ref=app
17th Jan 2019, 12:25 AM
FA_develops
FA_develops - avatar
+ 2
FA_develops In custom classes, Is this equivalent to simply declaring methods in the class?
18th Feb 2019, 12:50 PM
Nick
Nick - avatar