30-Days-Of-JavaScript
30-Days-Of-JavaScript copied to clipboard
Exercise: Level 2 Q.1
Create a separate countries.js file and store the countries array in to this file, create a separate file web_techs.js and store the webTechs array in to this file. Access both file in main.js file
I have tried import export module but not working for me...
Could you be more specific as to what folders these files are in
Hello dev,
If you want to access other js files in the main.js. You can try something like this:
<script src="./countries.js"></script> <script> console.log(countries) </script>
This way you can access any files in the folder using src.
Hope it helps.
Hey @devprotim, did you find the solution?