← codetypingtest

JavaScript typing test

JavaScript runs the web, and typing it means braces, semicolons and a lot of dots. console.log has a full stop in the middle, and every program here uses it. The programs are written in modern JavaScript, with let, const, classes and strict === comparisons, so the habits you build carry straight over to real code.

Start the JavaScript typing test

What you'll type in JavaScript

Example: FizzBuzz in JavaScript

This version keeps each branch on one line, so it's mostly else if, === and console.log again and again: good practice for rhythm.

for (let i = 1; i <= 15; i++) {
  if (i % 15 === 0) console.log("FizzBuzz");
  else if (i % 3 === 0) console.log("Fizz");
  else if (i % 5 === 0) console.log("Buzz");
  else console.log(i);
}

Type this program now

Tips for typing JavaScript faster

All 20 JavaScript programs

Every program is real, working JavaScript. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages