Implementing the Revealing Module Pattern JS
The revealing module pattern organizes JavaScript code into clean, encapsulated modules with explicit public APIs. Learn how it works, why it matters, and how to use it today.
Master JavaScript from basics to advanced
The revealing module pattern organizes JavaScript code into clean, encapsulated modules with explicit public APIs. Learn how it works, why it matters, and how to use it today.
The strategy pattern lets you swap algorithms at runtime by encapsulating each one in a separate object or function. Learn how to use it to write flexible, maintainable JavaScript code.
Learn how to build custom string parsers in JavaScript from scratch. Tokenize input, handle grammar rules, and turn raw text into structured data without external libraries.
Learn how to implement rate limiting in JavaScript to control how often a function or API call can execute. Protect your servers and respect third-party API limits.
Learn how to debounce functions in JavaScript to control how often expensive operations run. Master the pattern behind search inputs, resize handlers, and auto-save.
Learn how to throttle functions in JavaScript to enforce a maximum execution rate. Master scroll handlers, game loops, and real-time UI updates that need consistent firing.
Learn how libuv powers Node.js asynchronous I/O. Understand the event loop, thread pool, and how JavaScript handles file system, network, and DNS operations without blocking.
Learn how to prevent Cross-Site Scripting (XSS) attacks in JavaScript. Protect your users with output encoding, CSP headers, safe DOM APIs, and input sanitization.
Learn safe DOM rendering patterns in JavaScript. Master textContent, createElement, safe attribute handling, HTML sanitization, and CSP to prevent injection attacks.
Learn how JavaScript decorators wrap class methods to add logging without touching the original code, including setup with Babel and how execution order works.
Build a small counter app with plain JavaScript to practice selecting elements, handling clicks, and updating the page with the DOM.
Build a weather app that fetches live data for a city, handles loading and error states, and displays the result with plain JavaScript.