Declare variables with var to keep them in scope