Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

Importing and Exporting Modules in Node.js

This reference step cover the various ways to import and export modules in Node.js.

Export a Module

  1. Set module.exports to an object containing multiple functions:

    module.exports = { 
      reverseString: (string) => {...},
      shortenString: (string) => {...}
    };
    
  2. Create multiple named functions and export them together in the file’s `...