Vidyalelo
JavaScript · Q16

Sockets

Programming · JavaScript · question 16

Q16

What does the pushState() method do?

A.
Removes the state
B.
Adds new state
Answer
C.
Replaces the state
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
When a web app enters a new state, it calls history.pushState() to add that state to the browsing history.