save(); will erase the current saved program, and save the current state of the Espruino to flash, and then reset the Espruino (which will then start up with the freshly saved program and call onInit() if that function is defined).
If you want to clear the saved program, you can do reset(); (which restarts without loading saved code) and then save(); to save this clean slate.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
save(); will erase the current saved program, and save the current state of the Espruino to flash, and then reset the Espruino (which will then start up with the freshly saved program and call onInit() if that function is defined).
If you want to clear the saved program, you can do reset(); (which restarts without loading saved code) and then save(); to save this clean slate.