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 »