I am trying to create a website with html and jquery. I have data.js (with const travelInfoURL = '<url>';
) file with the url I need. I want to use it in main.js file, but I am getting the following error:
main.js:130 Uncaught ReferenceError: travelInfoURL is not defined
How to solve this issue? I tried to export the travelInfoURL in data.js (export{travelInfoURL};
), but it didn't help. The files are located in the same directory.