What is the difference between .js and .mjs files?

I have started working on an existing project based on Node.js. I was just trying to understand the flow of execution, where I encountered with some *.mjs files. I have searched the web where I found that these are module based JS-files.

I want to know how is it different from *.js files (how does it benefit)?

3 Answers
3

Leave a Comment