Your Search Results


    This is an experimental technology, part of the ECMAScript 6 (Harmony) proposal.
    Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future version of browsers as the spec changes.

    The super keyword is used to call functions on an object's parent.

    The super.prop and super[expr] expressions are valid in any method definition in both, classes and object literals.


    super([arguments]); // calls the parent constructor.


    When used in a constructor, the super keyword appears alone and must be used before the this keyword can be used. This keyword can also be used to call to call functions on a parent object.


    This code snippet is taken from the classes sample (live demo).

    class Square extends Polygon {
      constructor(length) {
        // Here, it calls the parent class' constructor with lengths
        // provided for the Polygon's width and height
        super(length, length);
        // Note: In derived classes, super() must be called before you
        // can use 'this'. Leaving this out will cause a reference error. = 'Square';
      get area() {
        return this.height * this.width;
      set area(value) {
        this.area = value;


    Specification Status Comment
    ECMAScript 6 (ECMA-262)
    The definition of 'super' in that specification.
    Release Candidate Initial definition.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support 42.0 Not supported
    bug 1066239
    ? ? ?
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile
    Basic support ? 42.0 Not supported
    bug 1066239
    ? ? ?

    See also

    Document Tags and Contributors

    Contributors to this page: jpmedley, fscholz
    Last updated by: fscholz,
    Hide Sidebar