You can declare variables at the top of any block, not just functions.