I am planning to implement class inherit interface using JavaScript. class is the perfect word as the name of the constructor.
class = function (classname) {}; // create a class with classname
classA = new class("classA"); // create a class named classA
Unfortunately, class is a reserved word in JavaScript.
Why does JavaScript reserve the word class (since it never uses it)?
It’s reserved to future-proof ECMAScript
Don’t fret though, if you’re using best-practices in your JavaScripts, you’re placing all accessible functions/variables/constructors in a namespace, which will allow you to use whatever name you’d like: