← codetypingtest

Dart typing test

Dart, the language behind Flutter, sits between Java and JavaScript: braces and semicolons everywhere, void main() to start, single-quoted strings and null safety with ? types. If you build Flutter apps, these programs are close to the code you write every day.

Start the Dart typing test

What you'll type in Dart

Example: FizzBuzz in Dart

Dart style puts every branch in braces, even one-line ones, so this FizzBuzz has more { and } than the JavaScript version.

void main() {
  for (var i = 1; i <= 15; i++) {
    if (i % 15 == 0) {
      print('FizzBuzz');
    } else if (i % 3 == 0) {
      print('Fizz');
    } else if (i % 5 == 0) {
      print('Buzz');
    } else {
      print(i);
    }
  }
}

Type this program now

Tips for typing Dart faster

All 20 Dart programs

Every program is real, working Dart. 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