Find me on medium
There are multiple design patterns that can be implemented in the JavaScript language, and in this post we will be going over th...
For further actions, you may consider blocking this person and/or reporting abuse
..which is equivalent to the code below, a typical class object in modern javascript. I prefer this over modifying prototype objects directly, just because it looks cleaner.
it is just syntactic sugar for above, which is very nice explanation of prototype pattern
I am an experienced java developer trying to learn javascript, this post helped me a lot to understand the inheritance used in javascript, i read several posts, but everyone says "JavaScript is a bit confusing for developers experienced in class-based languages (like Java or C++)" and continue with syntax and examples etc..., but never told about what's the exact difference, here only i got exact answer what i am looking for days. Thanks a lot.
That is awesome, your welcome!
Very informational read, never understood why some experienced devs used prototypes, now I do and plan on doing the same. Thanks a lot for shedding light on the subject
Very glad to hear that!