Repl.it auto-saves your code as you write, as every repl is backed by its own filesystem. If you ever make an edit to your code that you'd like to recover, repl history can help.
A repl's history is located at
https://repl.it/@username/repltitle/history, but you can reach the same page by
A repl history will show the individual changes to a file, from most to least recent. Clicking "change file" next to the file name will bring up a prompt to select the desired file. Selecting a time will reveal the code differences between the revision and the latest code.
To restore a previous revision of code, select the desired revision and click "Restore" in the top-right corner of the screen.
Here's a short gif demonstrating repl history in action: