1.

How will you update the URL displayed in the location bar?(a) location(b) location.URL(c) location.hash(d) urlI have been asked this question in unit test.I want to ask this question from History Management in JavaScript topic in chapter Sockets of JavaScript

Answer»

The correct option is (c) location.hash

To elaborate: The hash property sets or returns the anchor PART of a URL, including the hash sign (#). The property location.hash needs to be UPDATED to display the updated URL in the location BAR.



Discussion

No Comment Found

Related InterviewSolutions