JavaScript bank Architecture JavaScript / 8 questions Your progress 0 / 8 done Saved in this browser. Reset All 8 Easy 1 Medium 5 Hard 2 Hide done No questions match those filters. 1 Explain the Module pattern and how it provides encapsulation using closures/IIFEs. Easy 2 Implement the Singleton pattern in JavaScript and discuss whether it's an anti-pattern in modern module systems. Medium 3 Implement the Observer pattern (Pub/Sub) from scratch with `subscribe`, `unsubscribe`, and `publish`. Medium 4 Explain the Factory pattern and give a frontend use case (e.g., creating different UI components based on config). Medium 5 Explain the Decorator pattern and how higher-order components/functions implement it in JS/React. Medium 6 Implement a simple state machine pattern for managing UI states (idle/loading/success/error). Hard 7 Explain the Strategy pattern and how it helps avoid large conditional blocks for interchangeable algorithms. Medium 8 Explain the Proxy pattern using JavaScript's native `Proxy` object with a validation use case. Hard ← Previous Performance Next → Machine Coding