Saving objects in the local storage
Now, imagine that we are saving not only the score, but also the date and time when the ranking is created. We can either save two separate keys for the score and date time of playing, or pack the two values into one object and store it in the local storage.
We will pack all the game data into one object and store it.