switch statement in javascript

the swtich() allows you to avoid writing too many if statements.