Kamran Mushtaq
Back to Systems Design
Systems Design

JavaScript

Added: July 14, 2026

Definition

  • JavaScript (JS) is the programming language that makes websites interactive.
  • It sits between the browser and your webpage, handling user actions, updating content, calling APIs, and controlling application logic.
  • Vanilla JS means using JavaScript without frameworks like React.
  • ES6+ refers to modern JavaScript features (e.g., let, const, arrow functions, modules).
  • Webpack bundles many JS files into optimized files.
  • Babel converts modern JS into older versions so older browsers can run it.

What Problem It Solves

  • Makes webpages dynamic instead of static.
  • Lets developers write modern code while supporting older browsers.
  • Organizes and optimizes large applications.

What Happens If Not Used

  • Websites become mostly static.
  • Large projects become difficult to manage.
  • Older browsers may fail to run modern JavaScript.

Easy Wording

JavaScript is the "brain" of a website that reacts to what users do.

Layman Example

HTML is a car's body, CSS is its paint, and JavaScript is the engine that makes it move.

Technical Example

Flow: Browser → HTML/CSS loaded → Browser downloads JS → Babel (during build) transpiles ES6+ → Webpack bundles files → Browser executes JS → JS calls API → Server → Database → Response → UI updates.

Limitation: As applications grew, JavaScript lacked built-in type checking, making bugs easier to introduce. Solution: TypeScript adds static typing on top of JavaScript.