Month: July 2016

Object Oriented JavaScript – polymorphism

In previous post about object-oriented programming in JavaScript, we described how inheritance works. In this post, I’ll cover one more important concept of object oriented programming – polymorphism. I will not go into theoretical details, since there many online resources available, such as this Wikipedia page. Rather, I will try to explain how polymorphism can …

Object Oriented JavaScript – polymorphismRead More »

Object oriented JavaScript – encapsulation

In previous post, I wrote about inheritance in JavaScript. This time, I will cover another important concept in object-oriented programming – encapsulation. Class-based languages like Java and C++ provide built-in keywords like private¬† and protected¬† which facilitate implementing much of the concepts covered by encapsulation. By contrast, JavaScript, being prototype-based language, does not provide these …

Object oriented JavaScript – encapsulationRead More »