Concept understanding: ES6 Modules

I'm taking a class on NodeJS, which uses commonJS syntax in order to import and export modules.
ES6 syntax can also be used to import and export modules as well, however only on Browser-run JS with the needed <script type = "module"> attribute. ES6 syntax is not recognized in NodeJS since NodeJS was released prior to ES6. Else, if ES6 syntax can be used in a non-browser context, it would have to be for a different "runtime environment" than NodeJS. Is this close to correct?
4 Replies
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
thethingisback
thethingisback14mo ago
ah gotcha ok
Ssadiq Roy
Ssadiq Roy14mo ago
This is cool yet I still prefer CommonJs syntax in nodeJs.
13eck
13eck14mo ago
Please keep Node.js related questions in #back-end