⚖️
ℹ️ Import/Export
📝instruction
- first we create two modules suppose module1.js and module2.js
- Then module2.js →→→
- Then module3.js→→→
- Now if you run this then it will throw an error then there is one solution that : we will convert this to .js to .mjs extension
- Then it will work but only that variable is used that is by default is exporting in the module2.mjs
- If we want to excess all the variable declared in module2.js then we have to do like that→→
- export{a};
- export{b};
- export{c};
- Now you can excess this in the module1.mjs like this→ →