Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 04-11-2023, 03:20 AM   #1
sahithya
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.
sahithya is offline   Reply With Quote

Old 04-26-2023, 03:58 AM   #2
horizontour
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.
horizontour is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 12:24 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.