JavaScript Module Pattern
This is a common design pattern used in javascript programming where there is need for a getter and setter like functionality. It uses a self-invoking function to create a closure around it and then you can use getter and setter to access the properties. Some advantages of use this approach: Concept of private and public properties […]