Module 1: Language Basics
Module 1 covers Core JavaScript — the language itself, independent of any browser, framework, or tool. Get this foundation solid before moving on to Module 2 (the browser) and Module 3 (the wider ecosystem).
What is JavaScript?
JavaScript is a programming language — a set of rules for writing instructions a computer can run. On its own, JavaScript can do math, work with text, make decisions, repeat actions, and organize data. It doesn't know anything about web pages, servers, or apps by itself — those abilities come from the environment JavaScript is running inside.
JavaScript vs Browser vs Node vs React
This is the single most important distinction to get right early, so the rest of this course makes sense:
- JavaScript — the programming language itself (syntax, variables, functions, loops — everything in this Module 1)
- Browser — an environment where JavaScript can run, and which adds extra
abilities like the DOM,
fetch, andlocalStorage(Module 2) - Node.js — a different environment that runs JavaScript outside the browser, on a server or your own machine, adding abilities like reading files and starting a web server (Module 3)
- React — a JavaScript library, written in JavaScript, that helps build user interfaces — it is not a separate language
- Next.js — a framework built on top of React, adding routing, server-side rendering, and more structure
- npm / pnpm / Yarn / Bun — tools for installing and managing packages (reusable code other people wrote) — they are not languages or frameworks
- TypeScript — a superset of JavaScript that adds optional type-checking; all valid JavaScript is close to valid TypeScript, but not the other way around
JavaScript (the language)
↓
runs inside an ENVIRONMENT
↓
├── Browser → adds DOM, fetch, localStorage...
└── Node.js → adds file system, HTTP server, process...
React, Next.js, Express... are all just JAVASCRIPT CODE
written using the language, running inside one of these environments.
Keep these distinctions in mind throughout the course — Module 3 will come back to each of these ecosystem pieces (Node, React, npm, TypeScript, and more) in detail.
History & ECMAScript
JavaScript was created in 1995 and standardized shortly after under the name ECMAScript (often shortened to "ES") — this is why you'll see version names like ES5, ES6 (also called ES2015), ES2020, and so on. "JavaScript" and "ECMAScript" refer to essentially the same language; ECMAScript is the official specification that browsers and Node.js implement.
ES6 (2015) was a landmark release — it introduced let/const, arrow
functions, classes, template literals, Promises, and modules, all covered later in this module.
New features are still added roughly every year.
JS Engines & How JS Executes
A JavaScript engine is the program that actually reads your JavaScript code and runs it. Every browser has one built in — Chrome and Node.js use Google's V8 engine, Firefox uses SpiderMonkey, and Safari uses JavaScriptCore.
At a high level, an engine turns your code into something the computer can execute in three broad stages:
Your JavaScript code
↓
Parsing (checked for valid syntax, turned into an internal structure)
↓
Compilation (modern engines compile to fast machine code just-in-time)
↓
Execution (the code actually runs, line by line, top to bottom)
JavaScript runs on a single thread — it does one thing at a time, in order. How it still handles slow tasks (like waiting for data from a server) without freezing is covered in depth in Module 2's Event Loop chapter.
Syntax & Output
let name = "Chiru";
console.log(name); // prints to the console — your main tool while learning
// Statements are usually ended with a semicolon
let x = 5;
let y = 10;
console.log(x + y); // 15
// Single-line comment
/* multi-line
comment */
JavaScript is case-sensitive, and mostly ignores extra whitespace — but consistent formatting still matters for readability and for working well with tools like Prettier (Module 3).