JavaScript mock interview.
The JavaScript coding round, rehearsed for real: one function from scratch, hidden tests that probe the edge cases, the follow-ups an interviewer asks next, and a score at the end.
- Free for Google, Meta, Amazon, Microsoft and Flipkart
- Real editor and tests
- Every company with Pro
How you are scoredout of 100
- 60
- The workTests passed, or your design against the model answer
- 30
- Follow-upsThe questions an interviewer asks next
- 10
- TimeFinishing within the round's time
Build your interview
Pick up to 6 questions, or add them at random. They share one clock and open in any order.
Your interview
0 of 6
0min on one clock
- 1Tick a question, or add one at random
Add one at random
Mock interviews need a free account, and Google's round is free with one. You come straight back here after signing in.
What the JavaScript round tests
Most frontend loops include at least one round where you write plain JavaScript with no framework: implement debounce, a Promise.all polyfill, deep clone, an event emitter, or a retry with backoff. The interviewer is less interested in whether you have seen the question before than in how you handle the cases the example does not show.
This mock interview gives you that round under the same pressure. The clock starts as soon as the room opens, your code runs against hidden tests in the browser, and when you finish you answer the follow-up questions out loud before you see the model answer.
Correctness beyond the example
Hidden tests cover empty input, one item, rejected promises, repeated calls and large input, the cases interviewers add after your first version works.
Async control
Promises, timers and cancellation: whether results arrive in the right order, errors reach the caller, and timers are cleared.
The language itself
Closures, this, prototypes and the event loop, which polyfill questions are designed to expose.
Explaining as you go
The follow-ups ask why you chose an approach and what changes at scale, so you practise defending the code, not only writing it.
How to spend the clock
Interviewers notice how you use the time as much as the answer. A plan that works for most questions in this round:
- First 3 minutes
Restate and ask
Say the problem back, then settle the inputs, return value, error behaviour and edge cases before typing.
- Next third
A simple version that runs
Write the plainest correct version and press Run against the sample tests. A working baseline beats a clever half-solution.
- Middle
Edge cases and async details
Handle empty input, errors and timing. Submit early: the hidden tests are most of the score, and you can submit as often as you like.
- Last 5 minutes
Tidy and explain
Name variables clearly, remove dead code and say the time and space cost out loud, as you would to an interviewer.
Questions this round asks
- Polyfills: Promise.all, Promise.race, Function.prototype.bind, Array.prototype.reduce
- Rate control: debounce, throttle, a request queue with a concurrency limit
- Utilities: deep clone, deep equal, flatten, curry, get by path
- Async patterns: retry with backoff, timeouts, cancellation with AbortController
- Small systems: an event emitter, an LRU cache, a memoiser
Free questions you can be asked
From the free company rounds. Read one first, or start the round above and get one at random.
- Implement Function.prototype.bind(), including partial argumentseasy
- Implement a function to flatten a nested arrayeasy
- Implement debounce() with cancel() and flush()medium
- Implement throttle() with leading and trailing optionsmedium
- Implement curry() supporting partial applicationmedium
- Implement Promise.all() from scratchmedium
- Implement Promise.allSettled()medium
- Implement Promise.race()medium
Mistakes that cost points
- Starting to type before agreeing what happens on empty input or errors.
- Forgetting to clear timers, so a cancelled debounce still fires.
- Losing this or the arguments when wrapping a function.
- Submitting only at the end, so a small bug costs every test.
How the mock interview works
The same four steps as a real frontend round, from the first question to the debrief.
- 1Step 1
Build your interview
Pick how many questions you want from each round, the level and a company. Google, Meta, Amazon, Microsoft and Flipkart are free with an account; every other company is in Pro.
- 2Step 2
Solve them against the clock
The room goes full screen: your questions down the left, the problem beside a real editor with tests, and one clock for the whole set. Open the questions in any order.
- 3Step 3
Answer the follow-ups
Then the interviewer asks follow-up questions. Answer each one out loud, open the model answer, and grade yourself as strictly as an interviewer would.
- 4Step 4
Read your debrief
Tests or design, follow-ups and time add up to a score out of 100 for each question, with the verdict a debrief would give. Every score is saved to your dashboard.
Questions about this round
What does a JavaScript mock interview ask?
One function written from scratch in plain JavaScript, such as debounce, a Promise.all polyfill, deep clone or an event emitter, followed by follow-up questions about your choices. Hidden tests check the edge cases.
How long is the JavaScript round?
Each question has its own time limit, from 15 minutes for a short utility to an hour or more for a larger build; most take 20 to 60. You can add more than one JavaScript question to an interview, and they share one clock.
Can I use the browser console or look things up?
The editor has Run and a console for your own logs. Treat it like a real round: no searching for the answer, but checking a method's exact name is fine.
Is the JavaScript mock interview free?
With a free account you can take it for Google, Meta, Amazon, Microsoft and Flipkart, using their free questions. Pro adds every company and every JavaScript question.
React mock interviewFrontend system design mock interviewAll mock interview rounds