0 votes
in JavaScript by
What will happen if you reference document.location from within an object?

a) Traverses the queue

b) Finds the bugs

c) Traverses the stack

d) Traverses the array

1 Answer

0 votes
by

Answer:-  C

Reason: window.location.href returns the href (URL) of the current page) If you reference document.location from within an object, the interpreter will need to go from the function that references the variable, up out of the namespace to the global window scope, down to the document scope, and get the location value.

Related questions

0 votes
asked Oct 9, 2022 in JavaScript by Robin
0 votes
asked Oct 9, 2022 in JavaScript by Robin
...