Day 42 JavaScript Object Oriented Programming

Today I completed the object oriented programming which was different way of writing code in JavaScript. The traditional method of JavaScript was through prototypes. Object oriented programming is more relatable to the real world like products in inventory.

One of the best things about object-oriented programming (OOP) is the encapsulation feature. Encapsulation literally encapsulates data and prevents other objects from accessing its data. The data may only be accessed through its object’s function.

Classes are also a powerful feature in OOP, they create a template for generating objects during run time. However, what’s really powerful is that it can create inheritance. A faster way of updating due to its ability to extend existing classes. Sub classes can inherit all of the features of a super class while adding properties and functions of its own.

All in all getting close to finishing the JavaScript course in freecodecamp which I can’t wait to build projects repeatedly for a job.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑

%d bloggers like this: