You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Yep, the easiest way is using: https://www.espruino.com/Modules#from-storage

    require("Storage").write("answer",`
    exports.get = function() {
      return 42;
    };`)
    print(require("answer").get());
    // prints 42
    

    Rather than using require("Storage").write you can use the down-arrow by the Web IDE's Upload button to choose Storage and then the module filename you want - then you can upload directly.

About

Avatar for Gordon @Gordon started