JavaScript
Result
Run
License
var greeting = { showComment() { return "Hello"; } }; var useGreeting = { showComment(name) { return super.showComment() + ", " + name; } } Object.setPrototypeOf(useGreeting, greeting); console.log(useGreeting.showComment("John"));
Console
expand_less
License
License
by DevDic
Close