DEV Community

bobaram
bobaram

Posted on

import and export in JS modules

I am trying to export an html element i selected in one Javascript file and when I try to import it and console.log it, I am getting undefined or null. This is the line: export const notes = document.querySelector("#notes");

if i try to export anything else except for html elements in my js file, everything works fine.

Top comments (0)