Play this article
- In the browser, most of the time what you are doing is interacting with the DOM, or other Web Platform APIs like Cookies. Those do not exist in Node.js, of course. You don't have the document, window and all the other objects that are provided by the browser.
- Also in the browser, we don't have all the nice APIs that Node.js provides through its modules, like the file system access functionality.
- Node.js supports both the CommonJS and ES module systems (since Node.js v12), while in the browser we are starting to see the ES Modules standard being implemented. For example, this means that you can use both
importin Node.js, while you are limited to
importin the browser.
Thanks for reading...
Did you find this article valuable?
Support FOLASAYO SAMUEL OLAYEMI by becoming a sponsor. Any amount is appreciated!