JSJavaScript · Lesson 6 of 14
Classes & Modules
ES6 brought classes to JavaScript. They're syntactic sugar over prototypes, but don't let that ruin the moment.
◆ Note
In modern Node.js (with "type": "module" in package.json) and all modern browsers, use ES module syntax (import/export). In older Node.js code you'll see CommonJS (require/module.exports).
In modern Node.js (with "type": "module" in package.json) and all modern browsers, use ES module syntax (import/export). In older Node.js code you'll see CommonJS (require/module.exports).