Below we have a Immediately Invoked Class Expression. This could also be called a Self-Executing Anonymous Class.
To replicate this, our Immediately Invoked Class Expression would need at least these two features.
Above is what a Immediately Invoked Class Expression looks like. There are a few parts to this design pattern. Let me take you through them.
void operator evaluates the given expression and then returns
undefined. This will prevent our class polluting the global scope by always returning
new operator interprets the defined anonymous class immediately. This then calls the classes
constructor function as per the ECMAscript spec. So there you have it.