JavaScript
The only language browsers natively execute -- also runs on servers via Node.js.
CurrentbeginnerBeginner-friendlyFull course available
Overview
JavaScript started as a browser scripting language and is now used for frontend UIs, backend servers (Node.js), mobile apps, and more. Its defining traits are dynamic typing, first-class functions, and an event-driven, single-threaded concurrency model built around the event loop.
- What it is
- A dynamically-typed, interpreted language, the only one browsers run natively.
- Why it's used
- It's required for any browser interactivity, and Node.js extended it to servers -- one language across the whole stack.
- Where it fits
- After general programming basics; before any frontend framework (React/Vue/Angular) or Node.js.
Core concepts
- Variables and types
- Functions and closures
- Arrays and objects
- The DOM
- Async/await and promises
Example
async/await lets asynchronous code (a network request) read top-to-bottom instead of nesting callbacks -- fetch itself returns a Promise, which await unwraps.
async function getUser(id) {
const res = await fetch(`/api/users/${id}`);
return res.json();
}Common use cases
- Interactive web pages
- Backend servers (Node.js)
- Browser extensions
Project ideas
- An interactive quiz app
- A small API client that fetches and renders data