I remember in ES5, it was said that all objects inherit from Object. (formally, I think it is "inherit from Object.prototype")
Object.prototype
But in ES6, if I have the following code:
class Dog { constructor() { super(); // will cause an error } } const woofie = new Dog();
2.1m questions
2.1m answers
60 comments
57.0k users