You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All implementations assume console.log is a static function with side-effect.
All implementations assume Hello world!!! is a constant and does not need to be abstracted, does not need to be separated into a variable, and thus should always be inlined.
// following code would not work as Console is not publically initializableclassHelloWorldextendsConsole{print(){this.log('Hello world!!!');}}// usagenewHelloWorld().log();
// following code would not work as Console is not publically initializablefunctionHelloWorld(){}HelloWorld.prototype=newConsole();HelloWorld.prototype.print=function(){this.log('Hello world!!!');};// usagenewHelloWorld().log();