Why do we need to create locally scoped variables to hold value?
Why do we need to create locally scoped variables to hold value? Correct Answer To cache the reference document.location
window.location.assign loads a new document. The locally scoped variables are created to cache the reference to document.location.