js var declaration, the right way