All examples

FizzBuzz, .

The classic interview warm-up: divisibility branching in a loop.

fizzbuzz.js
function fizzbuzz(n) {
  const out = [];
  for (let i = 1; i <= n; i++) {
    if (i % 15 === 0) out.push("FizzBuzz");
    else if (i % 3 === 0) out.push("Fizz");
    else if (i % 5 === 0) out.push("Buzz");
    else out.push(i);
  }
  return out;
}

fizzbuzz(15);

What to watch

Watch the branch panel pick Fizz, Buzz, or FizzBuzz as i changes.

Reading fizzbuzzon a page only gets you so far - code is a process, and the process happens at runtime where you can't normally see it. In NeonFlow, this exact program runs step by step: every call opens a frame, every branch picks a path, and every value moves through memory in front of you. That's the fastest way to actually understand how fizzbuzz works.

Run fizzbuzz yourself

Open NeonFlow, paste this code (or any of your own), and scrub through it one step at a time.

Open NeonFlow