JavaScript is a high-level, interpreted programming language originally created for web browsers. Together with HTML and CSS, it forms the triad of core web technologies. JavaScript enables interactive elements — form validation, animations, dynamic content loading, single-page applications — without a full page reload.
Client-Side vs Server-Side
- Client-side JS — Runs in the user's browser. Manipulates the DOM, handles events, calls APIs.
- Server-side JS — Runs on a server via Node.js. Handles routing, database queries, business logic.
Modern JavaScript (ES6+)
let/const— Block-scoped variable declarations.- Arrow functions —
const add = (a, b) => a + b; - Promises & async/await — Cleaner asynchronous code.
- Modules —
import/exportfor code organisation. - Template literals —
`Hello, ${name}!` - Destructuring —
const { id, name } = user;
Popular Frameworks
- React — UI component library by Meta.
- Vue — Progressive framework for building UIs.
- Angular — Full-featured framework by Google.
- Next.js — React framework with SSR and static generation.