extends
A keyword that makes one class inherit from another.
What is extends in JavaScript?
extends — A keyword that makes one class inherit from another.
class Alert {
text() {
return "Alert";
}
}
class EmailAlert extends Alert {
text() {
return "Email";
}
}
Level: Journeyman · More JavaScript terms at this level
Updated