Scores on a phone are not comparable to a desktop hiring test.
Copy the JavaScript snippet exactly, including its two-space indents. Press Enter at each line break; spaces and symbols count too.
JavaScript · 1 minuteUnproctored practice, not a certificate.
1:00
Type to start
function countWords(text) {
const counts = {};
const words = text.toLowerCase().match(/[a-z']+/g) || [];
for (const word of words) {
counts[word] = (counts[word] || 0) + 1;
}
const entries = Object.entries(counts);
entries.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]));
const total = words.length;
return entries.filter(([word, count]) => count > 1 && word.length < 12).map(([word, count]) => ({
word,
count,
share: total === 0 ? 0 : Math.round(count / total * 100)
}));
}
const summary = countWords("It's a small world, and it's getting smaller.");
console.log(summary);
Unproctored practice score. Not a certificate.
Keep the syntax in place
The snippets use different small functions, so you may see loops, conditions, arrays, or strings on your next try. Watch for the kind of mistake a word test rarely catches: a missing brace, the wrong quote, or one space too many. The active line stays in view as the passage scrolls.
WPM counts correct characters, including every space and symbol. Accuracy counts wrong keys even when you fix them. The test copies visible source text; it does not run the program or check your ability to write one from scratch.