JavaScript: Saving

How in the code will describe the saving of the game on separate files, then to delete them?

Thanks!!!