A let binding named total is declared inside an if block. Where is that binding accessible?
Explanation
A let declaration creates a block-scoped binding, so total is available within that block and scopes nested inside it. Treating it as function-wide confuses let with the function-scoped behavior of var declarations inside functions.