Learn JavaScript
five minutes at a time.
JavaScript is the language of the web: every interactive site you use runs it, and it powers servers and apps too. Learn it if you want to build things people can open in a browser.
Start the JavaScript course free60 lessons · about 11 hours · beginner friendly
Your first program
const name = "Pebble";
console.log(`Hello, ${name}!`);Output
Hello, Pebble!The Codiqo JavaScript course starts at console.log() and covers let and const, strings, conditions, loops, arrays, objects, functions, classes, modules and async code, and ends with a flashcards app you build yourself.
How the JavaScript lessons work
Learn in small steps
Each lesson explains one idea with worked examples, then asks you about it straight away. About five minutes each.
Write real code
Predict the output, fix the bug, fill the gap and build programs line by line. Every lesson ends with a short program you write yourself, and we run it for real.
Keep it going
Earn XP, open chests, climb weekly leagues and keep your streak alive, with Pebble the penguin cheering you on and Terry the mentor giving hints.
The full JavaScript curriculum
Foundations
Syntax, variables, types, output and expressions.
First Steps: Write your first lines of JavaScript and store values in variables.
- Hello, JavaScript: Print with console.log() and write strings with quotes
- Numbers and Arithmetic: Calculate with + - * / and see the results
- Variables with let and const: Name values with let and const, reuse and update them
- typeof and Comments: Check types with typeof and explain code with comments
Text and Numbers: Build and change strings and work with numbers.
- Template Literals: Join strings with + and insert values with backticks and ${}
- Reading and Changing Text: Use .length, indexes, slice(), toUpperCase(), trim() and replace()
- Numbers and the Math Object: Use %, **, Math.round(), Math.max() and toFixed()
- Precedence and Updates: Predict the order of operations and update values with ++ and +=
Types and Logic: Convert between types and make true or false decisions.
- Converting Types: Use Number(), String(), parseInt() and parseFloat()
- Equality, null and undefined: Use === instead of == and represent missing values
- Booleans and Logical Operators: Compare values and combine conditions with && || and !
- Project: Eligibility Checker: Decide eligibility from several conditions
Logic and Repetition
Conditions, loops, Boolean logic and control flow.
Making Decisions: Run different code depending on conditions.
- if and else: Run code only when a condition is true and provide an alternative path
- else if and Nested Conditions: Choose between several options and put decisions inside decisions
- Ternary and switch: Pick a value inline with ? : and choose between many exact values
- Project: Grade Calculator: Convert scores into grades
Loops: Repeat work with while and for.
- while and for Loops: Repeat while a condition is true or a known number of times
- break, continue and Direction: Count up and down, exit early and skip iterations
- Running Totals and Searching: Accumulate a value in a loop and find whether something exists
- Project: Countdown: Print a formatted countdown
Patterns and Scope: Classic loop patterns and where variables live.
- Nested Loops and Building Strings: Put loops inside loops and grow text inside a loop
- Tracing Loops: Predict loop behaviour step by step and fix off-by-one errors
- Block Scope: Understand where let and const are visible and avoid var surprises
- Project: FizzBuzz: Solve the classic FizzBuzz problem
Data and Functions
Arrays, objects, strings, functions and methods.
Arrays: Store and process ordered lists of values.
- Creating and Indexing Arrays: Write array literals and read and change items by position
- Adding and Removing Items: Use push(), pop(), shift() and unshift()
- Looping and Searching Arrays: Loop with for...of and search with includes() and indexOf()
- Project: To-Do List: Manage a list of tasks
Objects and Functions: Model things with objects and reuse code with functions.
- Objects and Properties: Create objects and read and update them with dot and bracket notation
- Nested Data: Combine arrays and objects and loop over keys and entries
- Functions and Parameters: Write functions that take parameters and return results
- Arrow Functions and Closures: Write compact functions with => and functions that remember values
Array Methods and JSON: Transform data with methods and move it around as JSON.
- map() and filter(): Transform every item and keep the items that match
- reduce(), find() and sort(): Combine items into one value, find a match and sort correctly
- Destructuring, Spread and JSON: Unpack and copy arrays and objects and convert data with JSON
- Project: Grade Statistics: Summarise a list of scores
Applied JavaScript
Errors, modules, asynchronous concepts, APIs and practical projects.
Errors and Modules: Handle problems gracefully and split code into files.
- Reading Error Messages: Find the cause of an error and recognise ReferenceError and TypeError
- try...catch and throw: Handle errors, run clean-up code and signal problems of your own
- import and export: Share code between modules and understand npm packages
- Project: Safe Calculator: Build a calculator that never crashes
Async and APIs: Code that waits without blocking, and data from the web.
- setTimeout() and Callbacks: Understand the event loop and run code later
- Promises, async and await: Represent future values and write async code that reads top to bottom
- fetch() and JSON APIs: Request data from a URL, check status codes and handle failures
- Project: Data Explorer: Load and summarise API data
Capstone Project: Plan and build a complete JavaScript program.
- Planning and Modelling: Turn an idea into a plan and choose structures for the program
- Core Logic and the DOM: Implement the main logic and display data on a web page
- Events and Testing: Respond to clicks and typing and check behaviour with tests
- Polishing: Improve readability and output
Questions about the JavaScript course
Is the JavaScript course free?
Yes. All 60 JavaScript lessons, practice sessions, leagues and achievements are free. Codiqo Plus is optional and adds unlimited Compile Fuel.
Is it good for complete beginners?
Yes. It starts from your very first line of JavaScript and explains every idea before asking you about it. If you already know some JavaScript, a quick check lets you skip ahead.
How long does it take?
About 11 hours in all: 60 lessons of roughly five to ten minutes, in 4 chapters of 3 units. Most learners do a lesson or two a day.
Do I need to install anything?
No. Codiqo works in your browser and on iPhone and Android. The programs you write run on our servers in a locked-down sandbox, so there's nothing to set up.
What will I build?
Every lesson ends with a short program you write yourself, and the course finishes with "Capstone Project": Plan and build a complete JavaScript program.
Other courses
Learn Python · Learn C · Learn C++ · Learn Java · Learn C#