Skip to content

predict · control

A return in a try, and another in the finally.

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

function decide() {
  try {
    return "first";
  } finally {
    return "second";
  }
}
const answer = decide();
What does answer hold when the program has finished?