Skip to content

JavaScript typing practice

JavaScript typing practice is bracket practice. Arrow functions, callbacks and object literals stack round, curly and square brackets inside each other, often three deep on one line, and each one must be closed in the right order. The backtick and the dollar sign in template literals are the other keys worth drilling.

Practise JavaScript now

4 exercises, each complete and syntactically valid, chosen for the characters it drills rather than for what it computes. Untimed, and no account needed.

Drills=>(){};`

WPM0
Accuracy0.0%
Time0:00
Raw0
Consistency0%
const total = (items) => items.reduce((sum, item) => sum + item.price, 0);

console.log(`Total: ${total(cart)}`);

Click here to start — there is no timer

Indentation is spaces. Press Enter at the end of each line.

Why is JavaScript harder to type than English?

JavaScript nests more densely than almost anything else you will type. A single line can open a round bracket for a call, a curly brace for an object, and a square bracket for an array, then close all three in reverse. That is not a keying problem so much as a stack you have to hold while your fingers catch up, and it is why people who type English quickly still stall here. Template literals add two keys that appear nowhere else in ordinary typing: the backtick, alone in the top left corner under the weakest finger on the left hand, and the dollar sign on the number row.

Which keys slow you down in JavaScript?

The characters that cost the most time in JavaScript
KeyFingerWhy it costs time
{ Curly bracesRight little finger + ShiftObjects, blocks and destructuring. The most typed bracket in the language.
=> ArrowRight little finger, then right ring + ShiftTwo keys in quick succession, both away from the home row.
` BacktickLeft little fingerTop left corner. Appears in no other common typing, so it is never automatic.
$ Dollar signLeft index + ShiftTemplate literals. Always followed immediately by a curly brace.

Finger assignments follow the standard touch typing layout. The full chart is on the finger placement page.

The mistake JavaScript typists make most

Closing brackets in the wrong order under speed. Typing the opening run is easy because you are reading it; the closing run is where the hand gets ahead of the stack and produces a right parenthesis where a curly brace belongs. Editors auto-close brackets, which hides the problem entirely until you type somewhere that does not, such as a terminal or a code review box.

How fast should you type JavaScript?

Expect roughly 45 to 60 percent of your prose speed, which is lower than Python because of the bracket density. Someone typing 70 WPM of English typically reaches 32 to 42 WPM of JavaScript.

Measure prose first so you have something to compare against — a one minute test is enough. A code speed well below the range above usually means specific symbols rather than general slowness, and the test results name which keys they are.

Questions about typing JavaScript

How do I get faster at typing JavaScript?

Drill closing sequences rather than opening ones. Most people can type the first half of a nested expression at full speed and fall apart on the way back out, because that is the part your editor normally does for you. Typing complete snippets with the auto-closing turned off is the fastest way to fix it.

Which keys are hardest in JavaScript?

The backtick and the curly brace. The backtick sits alone in the top left corner under the left little finger and appears in essentially no other typing you do, so it never becomes automatic by accident. Curly braces need Shift and the right little finger, and they come in pairs, so the cost is doubled every time.

Does typing speed matter for programming?

Less than for data entry, and more than programmers usually admit. Typing is rarely the bottleneck in solving a problem, but hunting for a brace interrupts the thought you were holding, and that interruption is the real cost rather than the seconds themselves.

Should I practise with semicolons?

Practise typing them, whatever your project style is. The semicolon sits on the home row under the right little finger and is one of the cheapest symbols on the keyboard, so it is not where your time goes. The exercises here include them because most code you read will have them.

All free, and no account needed.