Trying to use Switch Statement in JavaScript