Ten coding questions you answer by writing real functions that run against tests, one 15-minute clock, and a score broken down by skill area. No sign-up to start.
An example of the result you get: a score, your time, and each skill area marked.
What the test covers
JavaScript coding screens for front-end and full-stack roles draw on the same short list of skills. The test takes two questions from each of the five, picked at random each time.
Basics
Loops, conditions and string handling on small problems: totals, palindromes, anagrams, FizzBuzz, balanced brackets. for, reduce, split, Map
Grouping, counting and de-duplicating records, chunking, sorting by several keys, and merging objects without changing the input. map, filter, reduce, sort, spread
Turning data from one shape into another: CSV to objects, a left join, a flat list to a tree, deep equality and deep clone. recursion, Object.entries, Map, Set
Closures and Promises: debounce, throttle, memoize, retry, a concurrency limit, and your own Promise.all. closures, Promise, async and await, setTimeout
These come from the same pool as the test. In the test you write the function in an editor, run it against the examples as often as you like, and it is checked on the examples and on hidden tests with edge cases.
Q1Anagram check
Basics
Return true when a and b are anagrams: they use exactly the same letters the same number of times. Ignore upper and lower case and ignore spaces, so "Dormitory" and "dirty room" are anagrams. Two empty strings are anagrams.
isAnagram(a, b)3 examples, plus 6 hidden tests in the exercise
Call
Returns
isAnagram("listen", "silent")
true
isAnagram("Dormitory", "dirty room")
true
isAnagram("hello", "world")
false
Show the answer
One solutionfunction isAnagram(a, b) {
const norm = (s) => [...s.toLowerCase().replace(/ /g, "")].sort().join("");
return norm(a) === norm(b);
}
Sorting the characters gives every anagram of a word the same spelling, so one comparison settles it. Comparing only which letters occur is not enough: aab and abb use the same letters with different counts.
Return an object that maps each value of item[key] to the array of items with that value, in their original order. Values become object keys, so the number 2 becomes the key "2". Keys are case-sensitive: "Paid" and "paid" are different groups.
groupBy(items, key)2 examples, plus 5 hidden tests in the exercise
One solutionfunction groupBy(items, key) {
const groups = {};
for (const item of items) {
const k = item[key];
if (!Object.hasOwn(groups, k)) groups[k] = [];
groups[k].push(item);
}
return groups;
}
One pass over the items is enough: look up the group for item[key], create it when missing, and push. Object keys are strings, so numbers and booleans turn into "2" or "true" automatically.
Return a debounced version of fn: calling it schedules fn to run wait ms later with the latest arguments, and every new call before then restarts the wait. So a burst of calls runs fn once, after the burst goes quiet. Tests run on a fake clock: setTimeout, clearTimeout and Date.now are simulated, so waits are instant and exact.
debounce(fn, wait)2 examples, plus 4 hidden tests in the exercise
Call
Returns
three quick calls, then 100 ms of quiet: fn runs once, with the last argument
[[3]]
calls 150 ms apart each run
[["a"], ["b"]]
Show the answer
One solutionfunction debounce(fn, wait) {
let timer;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => fn.apply(this, args), wait);
};
}
Clearing the pending timer on every call is what restarts the wait; only the timer from the last call survives long enough to fire, and it carries that call's arguments.
Each question is worth one point. You get the point when your function passes every test: the examples you can see and the hidden tests, which try cases like empty input, ties, negative numbers and large inputs.
You can run the examples and check your answer as often as you like while the clock runs. Each run stops after 3 seconds. A question you skip, or have not solved when the 15 minutes end, counts as wrong.
The result shows your score out of 10, the time you took, and each skill area as strong or to review, with links to the exercises for the areas you missed.
What your score means
0
1
2
3
4
5
6
7
8
9
10
0 to 4Build the basics first
Start with the first levels and work up. Short daily practice moves this score quickly.
5 to 7Working knowledge
The core is there. The areas you missed are the ones to drill before a timed screen.
8 to 10Interview-ready on this set
You solved questions from nearly every level under the clock. Drill the one or two areas you missed and you are in good shape.
These bands describe this test only. Employers set their own pass marks, and we do not know them.
Take the test
10 questions from 5 skill areas, 15 minutes on the clock. It starts right here, with no account and no email.
Hints and solutions are off while the clock runs.
Run the examples and check as often as you like. Skip counts as wrong.
Your answers survive a page reload.
The mistakes that cost the most points
Six slips worth fixing before a timed JavaScript test. The tests on Scriptdrill catch each of them.
Changing the input. sort, reverse and splice work in place, and a function that modifies the array it was given fails the test. Copy first with [...arr].
Skipping the edge cases. The hidden tests try empty input, ties, negative numbers and unicode text. Decide what your function returns for an empty array before you write the loop.
Sorting numbers as text. [10, 9, 1].sort() gives [1, 10, 9]. Pass a comparator: (a, b) => a - b.
Forgetting to return. A function with a block body returns undefined unless it says return, and an arrow function with braces needs it too.
A Promise that never settles. An async function has to resolve or reject on every path. A test here stops waiting after one second.
A wrapper that drops the arguments. debounce, throttle and memoize have to pass the caller's arguments through to the function they wrap.
The three formats a JavaScript test comes in
Multiple choice about the language: what typeof null returns, what a closure is, the order in which a Promise and a timeout run.
Live coding against tests, usually timed: read the task, write the function, pass the visible and the hidden cases. This test is that format, because knowing a method and writing it under a clock are different skills.
A take-home project: a small app or component and a few days. Structure and readability count as much as getting it to work.
Questions
Is the JavaScript practice test really free?
Yes. The test and every exercise on Scriptdrill are free. There is no card, no daily limit and nothing to unlock.
Do I need an account or Node installed?
No to both. The test starts in one click and your code runs in your own browser, in a background worker, so nothing has to be installed.
How long does the test take?
Up to 15 minutes. There are 10 questions on one clock, and the test ends when you finish the last question or the time runs out.
How is the test scored?
One point per question, 10 in total. A function scores when it passes every test, the visible examples and the hidden edge cases. Skipped or unsolved questions count as wrong. You also get a breakdown by skill area.
Is it like the JavaScript coding test employers use?
It uses the hands-on format: you write a function against visible and hidden tests under a clock, which is how online coding assessments work. It is not a copy of any employer's or testing company's test, and it does not include multiple-choice questions, the DOM, frameworks or system design.
Can I retake the test?
Yes, as often as you like. The questions are drawn at random from the exercise pool, so a retake is a different test.
What comes after the test?
Your result links straight to the exercises for the areas you missed. All 76 exercises are free, each with hidden tests and a reference solution. Certificates come with the Dravari bundle.
Find out where you stand
Ten questions, 15 minutes, a score by skill area. Free, and no sign-up to start.