Skip to content

About

Code-along notes and annotated exercises on advanced JavaScript — prototypes and the prototype chain, ES6+ syntax, iterators/generators, ES modules vs CommonJS, and common design patterns.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Advanced JavaScript — Code-Along Notes

Deliverable for the Advanced JavaScript roadmap module: prototypes and the prototype chain, ES6+ features, iterators/generators, ES modules, and common design patterns.

Contents

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)

How to run

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.js

For the module comparison:

node es-modules-example/index.mjs
node commonjs-example/index.cjs

Acceptance criteria mapped to files

  • 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

About

Code-along notes and annotated exercises on advanced JavaScript — prototypes and the prototype chain, ES6+ syntax, iterators/generators, ES modules vs CommonJS, and common design patterns.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages