A module is a function or object that presents an interface but that hides its state and implementation.
Separating our code into Modules
Let’s separate the
Portfolio classes from the test code. We create two new files named
portfolio.js in the same folder as
test_money.js and move the relevant code there. Here’s our new folder structure: ...