I have multiple JS classes in my project, and some of them are dependant on the others. Is it better to export from a module and use it as import in another module (or) create an instance of the class I need and use it as required(here I have an HTML file where I’ve included all the scripts I need)?

Am I missing any fundamental of export/import? Please feel free to correct.

PS: I’m using Node.js

Thank You

This post is also available on DEV.