I've just started building two pages(index.html / watchlist.html) website with javascript and jQuery.
have been using jQuery only a couple days.. so I am not familiar with the syntax..
so the problem is how to import a function and variable from one index.js file to another watchlist.js
file.
and some of the functions I separated in different(utils.js) file.
so I've tried this
In index.js on the top of the page I put
export {variableName}
In watchlist.js
import {variableName} from './index.js'