created a switch statement with a default in JS