Javascript ClassClasses are a template for creating objects. They encapsulate data with code to work on that data. You first need to declare your class and then access it, otherwise code like the following will throw a ReferenceError. /* * Classes are a template for creating objects. They encapsulate data with…