JavaScript Basics
10 lessons
Learn JavaScript from the beginning — variables, functions, arrays, objects, DOM, and async.
- 1
JavaScript Overview
What JavaScript is, where it runs, and why it is essential for modern web development.
- 2
JavaScript Variables
How to declare variables with let, const, and var, and the rules that govern them.
- 3
JavaScript Data Types
The primitive and reference types in JavaScript, and how typeof helps you inspect them.
- 4
JavaScript Functions
Function declarations, arrow functions, parameters, return values, and closures.
- 5
JavaScript Arrays
Creating, indexing, and iterating arrays, plus the essential map, filter, and reduce methods.
- 6
JavaScript Objects
Objects as key-value collections, property access, destructuring, and the spread operator.
- 7
Conditions
if/else, switch, ternary operator, truthy/falsy values, and short-circuit evaluation.
- 8
Loops
for, while, for...of, for...in, and how to break and continue iteration.
- 9
DOM
Selecting elements, handling events, and updating the page with the Document Object Model.
- 10
Async JavaScript
Callbacks, promises, async/await, and fetching data from APIs without blocking.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.