Hari 30: Recap & Road to Modern JS
60 min
Last updated 09 Apr 2026
30 Hari JavaScript — Apa yang Sudah Dipelajari
Fondasi
- Variables (let/const), Types, Operators
- Functions: declaration, expression, arrow, rest/spread
- Arrays, Objects, Destructuring
- Loops: for/while/forEach/map/filter/reduce
ES6+ Modern Features
- Optional chaining, Nullish coalescing
- Class, Inheritance, Private fields
- Generators, Iterators, Symbol
- Map, Set, WeakMap, WeakSet
- Proxy, Reflect
Async & Performance
- Promise, async/await, fetch API
- Event Loop, Microtasks vs Macrotasks
- Memoization, Debounce, Throttle
Design Patterns
- Observer, Singleton, Factory
- Closure-based modules
- Functional: pure functions, immutability, Maybe/Either
Langkah Selanjutnya
- 🚀 TypeScript — types + tooling lebih baik
- ⚛️ React/Vue/Svelte — UI framework
- 🟢 Node.js — JavaScript di server
- 🧪 Jest/Vitest — testing
- 📦 Vite/Webpack — build tools
💡
Notice: Kombinasi Observer pattern + functional pipeline. emit() dipanggil di dalam map() sebagai side effect. Ini adalah real-world JavaScript architecture!
Assignment
Final challenge: implementasikan observer pattern dan functional pipeline. Buat EventBus dengan on/emit, dan buat chain filter-map-reduce pada data mahasiswa.
Expected output:
Budi: 88 → A
Cici: 75 → B
Total nilai lulus (>=70): 163
JS
script.js
Solution
Output