MODULE - Glowing Neon Sign on stonework wall - 3D rendered royalty free stock illustration.  Can be used for online banner ads and direct mailers.

Importing a Module

To use a module that has the “export” keyword, we have to import it into our code. To do this we use the “import” keyword…

import { Animal } from ‘./animal.js’; 

This is placed at the top of the file and makes all of the items that have been exported from the animal.js file available. Notice the from part of the statement. This may change based upon the location of the js file being imported.

Happy Coding!

Clay Hess

Share this post

Excuse Our Mess! We are currently remodeling!

We are currently in the process of redesigning our site. We appreciate your patience as some areas of our site show chipping and paint peeling. We hope to have it sparkling soon!

Skip to content