Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
You are also able to call super on static methods.
Deleting super properties will throw an error
You cannot use the delete operator and super.prop or super[expr] to delete a parent class' property — it will throw a ReferenceError.
Deleting super properties will throw an error
You cannot use the delete operator and super.prop or super[expr] to delete a parent class' property — it will throw a ReferenceError.
Super can also be used in the object initializer notation. In this example, two objects define a method. In the second object, super calls the first object's method. This works with the help of Object.setPrototypeOf() wi
Super can also be used in the object initializer notation. In this example, two objects define a method. In the second object, super calls the first object's method. This works with the help of Object.setPrototypeOf() wi
When calling super.prop as a function, the this value inside the prop function is the current this, not the object that super points to. For example, the super.getName() call logs "Extended", despite the code looking lik
Setting super.prop sets the property on this instead
Setting properties of super, such as super.x = 1, behaves like Reflect.set(Object.getPrototypeOf(objectLiteral), "x", 1, this). This is one of the cases where understanding super as simply "reference of the prototype obj
This page was last modified on Jul 8, 2025 by MDN contributors.