This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.
Using Webstorage to locally store a high score and replace it if the score is broken.
You can also do this with Session instead of Local to keep the high score only for that session, not forever.
Watch on YouTube