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 User2y ago
Message Not Public
Sign In & Join Server To View
thethingisback
thethingisbackOP2y ago
ah gotcha ok
Ssadiq Roy
Ssadiq Roy2y ago
This is cool yet I still prefer CommonJs syntax in nodeJs.
13eck
13eck2y ago
Please keep Node.js related questions in #back-end
Want results from more Discord servers?
Add your server