Setting Variables Using Switch Statements In JavaScript