Learn JavaScript from absolute zero through games, projects, and fun!
No prior coding experience needed. We'll teach you everything step by step.
This course is designed for absolute beginners. You don't need to know anything about coding, HTML, CSS, or GitHub. We'll teach you everything from scratch!
Build real projects from day one. No boring theory!
Play games while you learn. Make coding fun!
Skills that employers actually want. Real-world projects.
Before we write code, let's understand what coding actually is!
Let's write your very first line of code! Type this in the box below and click "Run":
console.log() is like telling the computer "print this message". It's how we see what our code is doing!
Change the message inside the quotes. Try: "I'm going to be a developer!" or "Coding is fun!"
Variables are like boxes where we store information. Let's play a game to understand them!
In this game, you'll learn how variables work by storing and using information.
Type this code to create a variable called playerName:
let creates a new variable (a box to store things)playerName is the name of our variable= "Sierra" puts the value "Sierra" into the boxNow let's create a score variable and change it:
Create three variables:
favoriteColor - store your favorite colorage - store your age (as a number, no quotes!)isLearning - store true (because you are learning!)Then print them all out using console.log()
Let's build a Number Guessing Game! This will teach you about making decisions in code.
First, let's understand how the game works. Read through this code:
if checks a condition - "Is the guess equal to the secret number?"=== means "is equal to" (three equals signs!)else if checks another condition if the first one is falseelse handles everything elseplayerGuess to different numbers and run it again!
Now let's make a version you can actually play! Click the button below to start:
Let's build a complete game! This teaches you about arrays, random numbers, and more complex logic.
An array is like a list. Let's create one with our game options:
[ ] to create an arraychoices[0] gets the first itemClick the buttons below to play Rock Paper Scissors against the computer:
Choose your move above!
Score: 0 wins
Functions let you write code once and use it many times. Think of them as recipes!
Functions are like creating your own command. Let's make one that greets someone:
function - keyword to create a functiongreet - the name of our function(name) - parameter (information the function needs){ } - the code inside runs when we call the functionLet's create a function that does math:
return sends a value back from the functionadd(a, b)
Now let's build something real! A calculator that can add, subtract, multiply, and divide.
Write functions for each operation:
Try the calculator below! Enter two numbers and choose an operation:
You've learned the fundamentals of JavaScript! Here's what's next:
Move on to the full Training Modules to learn more advanced topics.
Check out the Projects page for more things to build!
Mark your progress on the Progress Tracker!
You're doing amazing! Every line of code you write makes you a better developer.