Deliverable for the Advanced JavaScript roadmap module: prototypes and the prototype chain, ES6+ features, iterators/generators, ES modules, and common design patterns.
| File | Covers |
|---|---|
01-prototypes.js |
Prototype chain, Object.create, constructor functions, class sugar, __proto__ vs prototype |
02-es6-plus.js |
Destructuring, spread/rest, optional chaining, nullish coalescing |
03-iterators-generators.js |
Iterator protocol, Symbol.iterator, generator functions, yield, delegation |
es-modules-example/ |
Working ES module example (import/export, .mjs) |
commonjs-example/ |
Equivalent CommonJS example (require/module.exports) for direct comparison |
04-modules-notes.md |
ES modules vs CommonJS — differences, when each is used |
05-design-patterns.js |
Module, Singleton, Factory, Observer patterns in vanilla JS |
NOTES.md |
Condensed explanations for each acceptance criterion (viva/interview style) |
Each .js file is self-contained and runnable with Node:
node 01-prototypes.js
node 02-es6-plus.js
node 03-iterators-generators.js
node 05-design-patterns.jsFor the module comparison:
node es-modules-example/index.mjs
node commonjs-example/index.cjs- Can explain the prototype chain →
01-prototypes.js,NOTES.md - Uses ES6+ syntax fluently →
02-es6-plus.js - Understands generators and iterators →
03-iterators-generators.js - Knows how ES modules differ from CommonJS →
es-modules-example/,commonjs-example/,04-modules-notes.md