What it is
An output quiz where the code is the answer key
Many JavaScript interview questions come down to one thing: knowing what the engine will actually do. JS Quiz asks exactly that, then proves the answer by running the code.
Who it is for
- Developers preparing for a JavaScript or front-end interview.
- Interviewers who want a quick, self-checking screen, with a summary that suggests what to ask next.
- Anyone who wants to test their grip on promises, closures and the event loop instead of just reading about them.
The question bank
10 questions, from Easy to Hard
Harder questions are worth more points. Each session shows them in a random order with the options shuffled, and you can answer them in any order from the question list.
| # | Question | Topic | Level | Points |
|---|---|---|---|---|
| 01 | Implicit Type Coercion | JavaScript Fundamentals | Easy | 1 |
| 02 | Shallow Copy with Object Spread | Array & Object | Medium | 2 |
| 03 | Temporal Dead Zone & Shadowing | Scope & Hoisting | Medium | 2 |
| 04 | Closures in Loops: var vs let | Scope & Hoisting | Medium | 2 |
| 05 | Promise Executor Timing | Async JavaScript | Medium | 2 |
| 06 | Missing await in try/catch | Async JavaScript | Hard | 3 |
| 07 | Microtasks vs Macrotasks | Event Loop | Medium | 2 |
| 08 | async/await Resumption Order | Event Loop | Hard | 3 |
| 09 | Losing this in Strict Mode | Functions | Hard | 3 |
| 10 | return Inside finally | Error Handling | Hard | 3 |
Step by step
How it works
-
Read the intro
Open js-quiz.allofcode.com. A short intro explains the topics, scoring, rules and timing. Nothing is timed until you click Start JavaScript Challenge.
-
Review the questions
For the next 5 minutes every question is shown read-only, so you can read the snippets before the quiz clock starts. This step can't be skipped.
-
Choose your time
Pick 5, 10 or 15 minutes. The quiz starts straight away, and the choice can't be changed.
-
Make your prediction
Pick one of the four options with the mouse, or press A to D. A verdict and an explanation appear once the code has run.
-
Run the code
Click Run Code or press Ctrl / Cmd + Enter. Your answer locks, and the real console output appears.
-
See your result
The quiz ends when every question has been run or the time runs out, and the result opens on its own. Questions you didn't run count as unanswered. Click Export PDF to save it as a report.
How answers are judged
Your prediction is checked against the real result
Each option describes an expected result. After the code runs, JS Quiz finds the option that matches what really happened. You are correct when that is the option you picked.
- Output
Printed lines
The option lists the exact lines the console prints, in order.
- Values
Logged values
Arrays and objects are compared by structure, not by how they happen to be formatted as text.
- Throws
An error
The code throws, for example a TypeError, optionally after printing some lines first.
- Timeout
Never finishes
The code is still running when the time limit is reached, such as an endless loop or interval.
The sandbox
Every run gets a new Web Worker that is thrown away afterwards. It
has no DOM and no access to the page, and network APIs such as fetch and WebSocket are disabled.
Async code and timeouts
The run finishes once all timers have fired and pending promises have settled, so async code completes naturally. A run that takes longer than 3 seconds is stopped, and anything printed before that is kept.
Scoring
Points, accuracy and the interviewer summary
Easy questions are worth 1 point, Medium 2 and Hard 3, for 23 points in total.
- A correct answer earns the question's points. A wrong answer earns none.
- Questions you never run count as unanswered and earn nothing. They lower the score, but not the accuracy, which is correct answers out of answered ones.
The result page
Score out of 23, accuracy, correct, incorrect and unanswered counts, whether the quiz was completed or the time expired, time spent and tab switches. Below that, a review of every question shows the code, the answer given, the correct answer, the explanation, the difficulty and the points earned.
Interviewer summary
Built from the answers with fixed rules, not AI: overall performance, strengths and areas for improvement by topic, a breakdown by difficulty, and suggested follow-up topics for the interview. The same answers always produce the same summary.
PDF report
Export PDF opens the browser's print dialog; choose Save as PDF. The report has the start and end time, time limit and session ID, the score and stats, the interviewer summary, and every question's review expanded. It is a text-based PDF made by your browser, so nothing is uploaded.
Performance rating
The summary turns your percentage of points into a rating:
- Excellent: 90% and up
- Good: 70% to 89%
- Fair: 50% to 69%
- Needs Improvement: Below 50%
Fair play
Built so the result reflects the candidate
JS Quiz is meant to be used as a timed screen, so it guards against the common ways of getting extra time or a second attempt.
-
Reloading resumes
The session, its deadlines and answers are saved in your browser, so a reload, a closed tab or a second tab picks up where you were with the clock still running.
-
The clock keeps running
Time is measured against fixed deadlines. Switching tabs, sleeping the computer or moving the system clock back doesn’t add time.
-
Answers lock
Running a question locks the answer. Once the quiz ends nothing can be changed, and the result page can’t be skipped.
-
Tab switches are recorded
Each time the quiz tab is hidden during the quiz is counted, with the time away, and shown on the result.
Known limitations
What JS Quiz doesn't do
Worth knowing before you use it as an interview screen.
- There is no code editor: you can't edit the snippets or run your own code.
- The question bank is fixed at 10 questions. The order changes per session, but the set doesn't.
- Answers can't be changed once the code has run.
-
Code runs in a browser Web Worker, so the DOM and Node.js APIs such as
requirearen't available. - There are no accounts, saved history or shareable result links. To keep a result, export it as a PDF.
- Everything runs in the browser. Someone who clears site data or edits it with developer tools before starting can get a fresh session; stopping that would need a server.
Privacy and data handling
Your answers stay in your browser
- Local execution. Snippets run in a Web Worker on your device. Nothing is sent to a server to be executed.
- No analytics, no third-party requests. The app loads only its own files.
- Saved in this browser only. The quiz session (question order, timers, answers and tab-switch count) is kept in this browser's local storage, so a reload or a closed tab doesn't reset it. Starting a new quiz replaces it, and a finished session is discarded after a day. Nothing is sent anywhere.
Questions
Common questions about JS Quiz
Do I need to write any code?
No. Every question shows a finished snippet and four possible results. You pick the result you expect, then run the code to check.
Can I change my answer after running the code?
No. Running a question locks your answer, so the score reflects what you predicted, not what you saw.
Can I pause the timer or start again?
No. The timer keeps running if you switch tabs or reload, and an active quiz can’t be restarted. Once the result is shown you can start a new quiz, which returns to the intro page, then begins with a fresh 5-minute preparation and a new question order.
Do all candidates see the same questions?
Yes, the same 10 questions, but in a different order, and with the four options shuffled. The review on the result page shows the answer text next to each letter, so results can be compared.
Is the code really executed?
Yes. Each snippet runs in a fresh Web Worker in your browser, and your answer is judged against what actually happened. The answer key in the question bank is checked against real execution by the project’s tests.
Can the snippets reach the network?
No. fetch, XMLHttpRequest, WebSocket and importScripts are disabled inside the sandbox, and the worker has no access to the page.
Does it cost anything or need an account?
No. JS Quiz is free to use and has no accounts.
Can I add my own questions?
Yes, if you run your own copy. Questions are plain JavaScript files in the source repository, and the README explains the format. The live site only uses its built-in question bank.
Think you know what the code prints?
10 questions, a real sandbox and an explanation for each one. Nothing to install and no account to create.