wrt chapter https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default and few others, I am reading about module
or file
Are these 2 terminologies same or different ?
Thanks,
Vikram
Every ES6 module is defined in its own file, so for most purposes, you can think of a module as a .js file that has at least one export
statement in it.
In browsers, modules can be defined by <script>
tags, so they’re not the same thing as files, but in the node.js environment, or when using module bundlers such as webpack, you can think of modules and files as being equivalent.
Thanks for detailed clarifications. IMHO this should be covered in basic javascript topics
Regards,
Vikram