Question: 28. Given the following code: 1 1 (function(window) 3 3 var obj-; 5 5 obj.dreamOnfunction ( 6 6 console.log(I want to see the global scope!







28. Given the following code: 1 1 (function(window) 3 3 var obj-; 5 5 obj.dreamOnfunction ( 6 6 console.log("I want to see the global scope! Let me out!"); 9 9 window.doerobj; 10 10 12 12 13 13 doer.dreamOn (O: What (if anything) is missing from this code in order to get it to output the message of the "dreamOn" method? 4 Marks A. Nothing is missing. It will output "I want to see the global scope! Let me out!" B. Line 1 and Line 9 should use 'global instead of window'. C. The function definition in Line 5 is missing an argument. It should accept an argument by the name of window' D. The attempted lIFE is not being invoked and passed in the window object. It's missing '(window)' Line 11 right before the semicolon
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
