Which of the following method is used to replace the current history state instead of adding a new state to the browsing history?
A
replaceState()
B
replace(state)
C
replace()
D
change()
Correct Answer: replaceState()
The replaceState() method is used to replace the current history state instead of adding a new state to the browsing history. It updates the most recent entry on the history stack to have the specified data, title, and, if provided, URL.