var name = "The window"; function aaa () { this.name = "My object"; this.getnamefunc = function () { return   ;name; } } function bbb ( ) { this.name = "My object"; this.getnamefunc = function () { return this.name; }     }&N BSP;   FUNCTION CCC () { this.name = "My Object "; this.getnamefunc = function () { return function () { return this.name; }; }   ; } function ddd () { &nbsP this.name = "My object"; this.getnamefunc = function () { return function () { return name; }; } } var object = { name : "My object", getnamefunc : function () { return function () { return this.name; };&N bsp; } var a = new aaa (); VAR B = NEW BBB ();   VAR C = NEW CCC (); var d  = NEW DDD (); a.getnamefunc (); b.getnamefunc (); c.getNameFunc ( ) (); d.getnamefunc () (); object.getnamefunc () ()
Request Output ~
JS Pen Questions