Why are ES6 classes not hoisted?
Why are ES6 classes not hoisted? Actually they are hoisted (the variable binding is available in the whole scope) just like let and const are – they only are not initialised. It would make sense to hoist its definition No. It’s never a good idea to use a class before its definition. Consider the example … Read more