Skip to content

predict · queue

A model wrote this to read a total. Say what `total` holds when the last line runs.

Answer before anything runs. Then the machine runs it, and you can step through what it did.

async function fetchCount() {
  return 41;
}

function report() {
  const count = fetchCount();
  return count + 1;
}

const total = report();
What does `total` hold when the program has finished?