The super keyword is used to access or call functions of the object's parent. super.prop can be used to access parent class properties. Syntax: // way to use super(); // calls the parent constructor super.functionOnParent(); // calls parent functi...

Markdown supported · ⌘↵ to post
Yousaf Khan
Exploring the world of software engineering
"We can also use the
thiskeyword from childCase to access the parentthisobject." - Nice article Rahul but i want to point something out: reason why you shouldn't use "this" to access the parent class is not because of readability, it's because it can cause infinite recursion if you have at-least 3 classes in the inheritance hierarchy: A -> B -> C.