28. Given the following code: 1 1 (function(window) 3 3 var obj-; 5 5 obj.dreamO
ID: 3919749 • Letter: 2
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! 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 semicolonExplanation / Answer
28. Option D
29.
Boolean -- holds true or false
Null -- null means nothing. it is used to set an object to nothing
Undefined -- a variable without a value, has the value undefined.
Number -- Numbers with and without decimals
String -- Characters
Symbol -- for creating unique identifiers for objects
Object -- for storing collections of data and more complex entities
30. Option D
For the first if the datatype and also the value are same
For the second if the value is compared not the datatype
For the third if the value and datatype both are compared and this if fails
31. Option E
32. Option A
Prevents a script of one page from accessing the data on another page
33. Option B
34. Option B
arguments.length
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.