LEVEL 2 · JAVASCRIPT
Course Foundation
JavaScript fundamentals
The JavaScript language from your first line: values and types, scope, operators, decisions and loops, functions, arrays and objects, classes, errors, modules and your first asynchronous code.
0 of 19 lessons done
When you finish, you can
- Predict what a JavaScript expression returns, including coercion and equality
- Explain scope, hoisting, the temporal dead zone and closures
- Write functions, including recursive and higher-order ones
- Model data with arrays and objects and transform it with array methods
- Write a class, throw and catch errors, and split code into modules
- Read and write promise-based code with async and await
You build: Small command-line programs: a calculator library, a student manager and a guessing game
MODULE 1
Getting started
- 1Meet JavaScriptLearn where JavaScript comes from, who decides how it changes, how to tell which features you can use, and the syntax rules every line of code follows.40 min
- 2Set up your computerInstall Node.js, try JavaScript in the Node.js REPL, write and run your first program, and turn its folder into a project.30 min
MODULE 2
Values and operators
- 3Values, variables and typesStore values in variables with const and let, meet the seven primitive types, and learn how JavaScript handles text, numbers, true and false, and "no value".35 min
- 4Types in depthMap every JavaScript type, see why objects are shared while primitives are copied, and learn exactly how equality and type coercion decide what your comparisons return.50 min
- 5OperatorsCalculate, compare and combine values with JavaScript's operators, give missing values safe defaults with ?? and ?., and avoid the classic precedence traps.30 min
MODULE 3
Control flow
- 6Making decisionsLet your program choose what to do with if, else if and else, the ternary operator and switch, and keep decisions readable with guard clauses.30 min
- 7LoopsRepeat work with for, while, do...while, for...of and for...in, control a loop with break and continue, and build a number guessing game.35 min
MODULE 4
Functions
MODULE 5
Arrays and objects
- 9ArraysKeep ordered lists in arrays, add and remove items, search them, and transform them with map, filter, reduce and sort, then build a small student management system.40 min
- 10Objects and JSONGroup related values into objects, read and change their properties, copy and take them apart safely, and turn them into JSON, the text format every API speaks.40 min
- 11Objects in depthLock an object's shape, validate writes with setters, hide fields, and copy and compare objects safely, by building a bank account that cannot be broken.50 min
- 12Modern JavaScriptTake a piece of old-style JavaScript and rewrite it step by step with the modern syntax a backend uses every day, fixing real bugs on the way.35 min
MODULE 6
Scope, closures and recursion
- 13Scope and how code runsLearn where a name can be used, how closures remember values, why some names exist before their line runs, and how the call stack and the heap work, so you can read error messages and debug real programs.40 min
- 14Closures in depthSee how closures really work through lexical environments, then use them for private state, function factories, memoization and cleanup, without leaking memory.45 min
- 15RecursionWalk folders, comment threads and org charts of any depth with functions that call themselves, then make them safe against deep and circular data.50 min
MODULE 7
Classes, errors, async and modules
- 16this, prototypes and classesUnderstand what this means inside a method and why it gets lost, how objects share methods through prototypes, and how to write classes with private fields, getters, static methods and inheritance.45 min
- 17Handling errorsTell syntax, runtime and logic errors apart, throw and catch errors, read an Error object's name, message, cause and stack, write your own error classes, and turn errors into safe API answers.40 min
- 18Asynchronous JavaScriptLearn why a backend waits without blocking, how callbacks, promises and async/await work, how errors travel through asynchronous code, and how to run work in sequence or in parallel.50 min
- 19ModulesSplit a program into files with ES modules, understand the older CommonJS require, choose between named and default exports, and avoid circular dependencies.40 min
Course checkpoint
Prove you can move on. The checkpoint picks 20 questions at random from every lesson in this course. Get 16 right to pass. Your result is saved in this browser only.