To proper understand the OOP in JS, we should have proper basic understanding of following topis. For each topic there is separate file for better understanding. Follow the files as per order.
- Object Literal
- Constructor
- Prototypes
- ES6 Classes
- ES6 SubClasses
For code output
- Check Object liteals code output at : http://tpcg.io/BiOR0UuP
- Check Constructor Fxn output at : http://tpcg.io/A86KN1iv
- Check Prototype output at : http://tpcg.io/WmMuyqDu
- Check required file in this gist for code (4_classes.js)
- Check required file in this gist for code (5_sub_class.js)