You might be able to get it as a string by looking in the 'console' under settings...
However if you install the command-line tools https://www.npmjs.com/package/espruino you can use -o out.js to output the code directly to a file.
-o out.js
@Gordon started
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.
You might be able to get it as a string by looking in the 'console' under settings...
However if you install the command-line tools https://www.npmjs.com/package/espruino you can use
-o out.js
to output the code directly to a file.