Saturday, February 18, 2017

OOP with JavaScript Experiments

Earlier, on January 8th, I said, "I was studying OOP with polymorphism, inheritance, and encapsulation. For some reason I picked up a book on C with C++. It's fun comparing."

OOP in JavaScript not like C++.

"While this is often considered to be one of JavaScript's weaknesses, the prototypal inheritance model is in fact more powerful than the classic model. It is, for example, fairly trivial to build a classic model on top of a prototypal model."

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#Bad_practice_Extension_of_native_prototypes

No comments:

Post a Comment