If with a short statement
Like for, if can start with a short statement that runs before the condition is checked. It’s a handy pattern for computing a value and immediately branching on it.
Variables declared in that short statement are scoped to the if block — they vanish after the closing brace.
Try it — attempt to use v in the last return statement and see the compile error.