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 covers the various ways to import and export modules in Node.js.
Export a Module
-
Set
module.exports
to an object containing multiple functions:module.exports = { reverseString: (string) => {...}, shortenString: (string) => {...} };
Create multiple named functions and export them together in the fileβs ...