← Gallery

Asynchronous Code

by Anonymous

Set timer delays and see why code doesn't run in the order you wrote it, and why loops need a stop condition.

Ready to remix β€” hit the 🍴 Remix button below. You'll sign up first, then this app is copied into your workspace.

πŸ”— Open in a new tab

About this app

Asynchronous Code is an interactive beginner lesson about why JavaScript may execute code in a different order from how it is written. Explore delayed actions, predict which items appear first, and see how scheduled callbacks with different wait times are ordered. A repeating activity also demonstrates intervals, stopping after a chosen count, and what happens when no stop condition is set.

Use cases

  • Beginners learning JavaScript execution order
  • Teachers demonstrating asynchronous behavior in class
  • Students practicing timers and delayed callbacks
  • Learners exploring repetition and stop conditions

Features

  • Set each action to run now or after a delay
  • Run visual timing exercises with animated output order
  • Predict execution order by selecting chips
  • Practice repeated actions with adjustable intervals
  • Choose when a repetition stops or observe an uncapped loop
  • Reset exercises and move through four challenges per lesson