codecademy javascript tutorial - module

in #javascript6 years ago

I'll modify this post with my comment!

INTERMEDIATE JAVASCRIPT MODULES
Review
We just learned how to use JavaScript modules. Let's review what we learned:
Modules in JavaScript are reusable pieces of code that can be exported from one program and imported for use in another program.
• module.exports exports the module for use in another program.
• require() imports the module for use in the current program.
ES6 introduced a more flexible, easier syntax to export modules:
• default exports use export default to export JavaScript objects, functions, and primitive data types.
• named exports use the export keyword to export data in variables.
• named exports can be aliased with the as keyword.
• import is a keyword that imports any object, function, or data type.

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.029
BTC 67050.87
ETH 3252.29
USDT 1.00
SBD 2.64