Before ES6, There are no classes.
Let’s see how to define classes in ES5.
With ES5, classes can be created using functions and prototypes
function Employee(name) {
this.name = name;
}
Employee.prototype.getName = function() {
console.log(this.name);
};
var employee = new Employee("John");
employee.getName(); // John
console.log(employee instanceof Employee); // true
console.log(employee instanceof Object); // true