Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started