Q. What is the purpose of the window.location object in JavaScript?

  • (A) Get the URL and redirect
  • (B) Get the location of the cursor
  • (C) Get the path to the next page
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) Get the URL and redirect
Explanation: The window.location object can be used to get the current page address (URL) and to redirect the browser to a new page.
Explanation by: Mr. Dubey
The window.location object can be used to get the current page address (URL) and to redirect the browser to a new page.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
171
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate