Learn JavaScript

Lesson 6 of 9 ¡ Async 1: Callbacks and the Event Loop

Module 12 ¡ Async 1: Callbacks and the Event Loop

The Contest and Interview Pack: Output Puzzles, Debounce and Throttle, Threads and a Timer Heap

ProReading

Zara has an interview on Friday for a front-end role. She knows the format: a whiteboard, five lines of code mixing setTimeout and then, and the question "what does it print?". Then a follow-up about debounce, and one about threads. She also enters a contest on Saturday, where one problem is a scheduler with ten thousand nested timers.

Checking what this lesson needs for youâ€Ļ

What is inside The Contest and Interview Pack: Output Puzzles, Debounce and Throttle, Threads and a Timer Heap

  1. Five output puzzles
  2. Debounce and throttle by hand
  3. Is JavaScript single-threaded? The honest answer
  4. The contest pattern: a timer heap
  5. Six interview questions