I’ve three html files a.html
,b.html
& c.html
All of them call index.js
.
Inside index.js
, I’m importing a variable
from a.js
,b.js
& c.js
. Based on which html file called index.js
, I want to use the variable from the corresponding js file inside index.js.
It’s not possible for me to remove index.js as it contains logic, which is needed for some other tasks.