← Questions

JavaScript scope, closures, timers and the event loop

0
AppleCodingLast asked Jul 2026

A coding interview question asked in Apple's technical phone screen, last asked Jul 2026. It tests javascript, closures and event loop.

Predict what short JavaScript snippets print, then explain why in terms of scope, closures and the event loop. The interviewer moves from scope rules to closures in timer callbacks, then to the order of synchronous code, microtasks and…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Apple · Technical phone screen · Last asked Jul 2026

What it tests

javascript · closures · event loop · frontend

Your code and the AI tutor open when you unlock this question.