๐super
JS โฉ value โฉ object โฉ class โฉ inheritance โฉ super
access properties on object literal / class's prototype object. (
super.prop
/super[expr]
are valid in any method definition in object literal / class)invoke superclass constructor. (
super(...args)
is valid in class constructors)
super
is not a variable that points to the prototype objectโ
attempting to read super itself is a
SyntaxError
โ
arrow functions do not have
super
. (๐ see: Arrow functions revisited)If accessed, itโs taken from the outer function.
๐ see: JavaScript.info
๐พ ็จๅผ๏ผ replit
Last updated