04-11-2023, 03:20 AM | #1 |
Registered User
Join Date: Feb 2013
Location: Bangalore
Posts: 1,095
|
Javascript super keyword
In JavaScript, the super keyword is used to call methods or access properties of a parent class within a subclass.
When a class extends another class, the subclass can call the constructor and methods of the parent class by using the super keyword. For example, to call the constructor of the parent class, we can use super() inside the constructor of the subclass. This is useful when we want to inherit properties and behavior from the parent class. The Car class calls the super keyword in its constructor to call the constructor of the parent Vehicle class and set the make and model properties. It then adds its own year property.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
04-26-2023, 03:58 AM | #2 |
Registered User
Join Date: Aug 2016
Location: Agra, India
Posts: 555
|
Useful information about this forum thread posting and sharing online here.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is ‘this’ keyword in JavaScript? | bhavnasingh482 | Programming General | 1 | 03-21-2018 11:16 AM |
Super Bowl | vukob | General Discussion | 0 | 02-04-2018 01:30 PM |
what is javascript | ehsanagar | Javascript | 6 | 04-18-2017 03:48 AM |
The difference between keyword density, frequency, prominence and proximity | rajivwebads | Search Engine Optimization | 4 | 11-06-2015 02:56 AM |
40 Super Nice JavaScript Extensions and Plugins | JavaScriptBank | Javascript | 0 | 04-28-2013 11:14 PM |