How do I make a basic easy Save and load function with JavaScript

I would like to see a working basic code so when I click on an object it will save everything in the Sean and when I go to load my game it loads right from where I saved. If anyone is familiar with Game Maker:Studio I would like it to work the same way it works in Game Maker:Studio.

It doesn’t work that way. Saving and loading is fairly complicated and almost always has to be tailoired the project’s needs. The closest thing to a out-of-the-box-ready solution is the Unity Serializer, available for free on the asset store, which requires a minimal amount of setting up.