Object-Oriented Programming (OOP) can be a great way to organize your projects. Introduced with ES6, the javascript class syntax makes OOP easier.

Before the class syntax was available, if you wanted to do OOP you would need to use a constructor function.