Do not rely on implicit global variable declaration. Instead, use `var` to explicitly declare variables.