Topics Covered
Duration: 80 minutes
Learning Objectives:
Understand the module system in Node.js.
Learn how to use CommonJS and ES6 modules.
Outline:
Importing and exporting modules.
Core vs. third-party modules.
Introduction to
npmfor package management.Working with
package.jsonand dependency management.
Student Activity:
Write and use a custom module to calculate the factorial of a number.
Install a third-party package like
chalkand use it to color the output of your application.
Homework Assignment:
Write a module that exports utility functions for string manipulation (e.g., reversing a string, changing case).
Research and list three popular npm packages used in production projects.
Last updated