create switch statement in javascript, initial commit