Classes were brought to JavaScript in ES2015. This allows JavaScript to act more like traditional Object-oriented languages. Let’s look at how we create a class in JavaScript.
Notice that the syntax looks very similar to the Constructor function.