Real lines of JavaScript with every bracket, arrow, dot and semicolon left in. The test above is already set to JavaScript; start typing to begin.
Each run strings together real JavaScript one-liners, shuffled, until there are at least 55 pieces to type. These three are straight from the test:
export function debounce(fn, wait = 120) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), wait);
};
}const total = items
.filter((item) => item.inStock)
.reduce((sum, item) => sum + item.price, 0);
console.log(`Total: ${total.toFixed(2)}`);async function loadUser(id) {
const res = await fetch(`/api/users/${id}`);
if (!res.ok) throw new Error(res.statusText);
return res.json();
}Typed as tokens: export function debounce(fn, wait = 120) and so on, one Space between each.
Type a piece, press Space, and move on. A piece only counts when every character is right. The clock starts on your first key and the run ends when the last piece goes in.
Close to a quarter of every character here is a symbol. Round brackets top the list, because every call and every arrow function needs a pair, followed by the dot of method chains, then equals signs, double quotes and semicolons. This is how often each symbol appears in the JavaScript test, and where it lives on a US keyboard:
| Symbol | Name | Share of symbols | Key (US layout) | Finger |
|---|---|---|---|---|
( | Opening bracket | 16% | Shift + 9 | Right ring |
) | Closing bracket | 16% | Shift + 0 | Right little |
. | Full stop (dot) | 13% | . | Right ring |
; | Semicolon | 10% | ; | Right little |
= | Equals | 9% | = | Right little |
{ | Opening brace | 5% | Shift + [ | Right little |
> | Greater than | 5% | Shift + . | Right ring |
} | Closing brace | 5% | Shift + ] | Right little |
, | Comma | 4% | , | Right middle |
" | Double quote | 3% | Shift + ' | Right little |
The arrow => deserves its own practice: it is the equals key and then Shift plus the full stop, both on the right hand, so the left little finger has to be on Shift at exactly the right moment. Strict equality, ===, is three taps of the same key; let them run as one quick burst.
.filter(Boolean).map((x) is a pattern: dot, name, bracket. Say it in your head and the hands follow.querySelectorAll, need a quick Shift with the opposite hand without breaking the word.${ is Shift plus 4 and then Shift plus the opening square bracket.Like every Presspace test: net words per minute counts correct characters, five to a word, and accuracy counts every key you press. The result also shows raw WPM, consistency, your slowest pieces and a heatmap of the keys you missed, and every run is saved in your browser.
Write TypeScript at work? The TypeScript typing test adds type annotations, generics and angle brackets.
Real one-line snippets: a reduce with an arrow function, a querySelectorAll chain, a destructured await, a try and catch around JSON.parse, a Fisher-Yates loop and a template literal with a dollar sign and braces. They are shuffled into every run.
Almost a quarter of the characters in these lines are symbols, and most need Shift or a reach to the edge of the keyboard. One wrong bracket also makes a whole piece wrong. A lower number is normal; what closes the gap is typing brackets and arrows without looking.
No. Each line is split on spaces into pieces, and you type the pieces with one space between them. That keeps the test on the symbols and camelCase names that slow programmers down.
No. This page opens the code test in JavaScript for this visit only. Your saved code language stays as it was until you choose one yourself in the options above the test.
Typing tests by length: 15 second typing test · 30 second test · 1 minute typing test · 2 minute test · 5 minute typing test · 10 minute test · custom text
In other languages: Spanish typing test · French typing test · German typing test · Portuguese typing test · Italian typing test · Test de mecanografía en español · Teste de digitação em português