Frontend · Intermediate

JavaScript interview practice

Practice JavaScript interview questions on closures, prototypes, async programming, and ES6+ features. Practice with an AI interviewer that scores clarity, depth, and answer structure — and tells you exactly what to fix.

JavaScript questions to practice saying out loud

Reading answers isn’t practice. Use these as your warm-up, then run a scored interview and hear yourself answer them.

Explain closures with an example.

A closure is a function that retains access to its lexical scope even when executed outside that scope. Example: function counter() { let count = 0; return () => ++count; } — the returned function closes over count.

What is the event loop?

The event loop continuously checks the call stack and callback queue. When the call stack is empty, it picks the first callback from the queue and pushes it to the stack. This enables non-blocking async operations in single-threaded JavaScript.