The best way to restore your world if you’ve made a mistake/want to make some changes is to revert to a previous version of your world. 🗺
Click the World button on the right of the code editor and navigate to the Backups tab. Choose which backup you’d like to restore your world to and click Ok. Your world will then be restored to the version you picked! 😀
Your world backs up quite regularly, so there should be a good selection of times to choose from!