Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Message{
constructor(name) {
this.name = name
}
say(serif) {
if(!serif) serif = "";
console.log( this.name + ': World!' + serif);
}
}
class Loud extends Message{
constructor(name) {
super( name )
}
loud() {
this.say("!!!!!!!!!!!!!!!!!")
}
}
var l = new Loud("Hello!");
l.loud(); // Hello!: World!!!!!!!!!!!!!!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.