5 hands-on exercises and 5 find-the-bug challenges for the JavaScript history Object lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Report the type of history.pushState.
Build a state object and read a property from it.
Report the type of history.length.
Report the type of history.replaceState.
Push a state and read it back from history.state.
The first argument should be the state, not just a string.
Going back in history is a different action from reloading.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspacePushed state is read from history.state, not from the pushState call itself.
A negative number goes backwards.
Replacing the entry should not add a new one.