Typescript Switch Expression Javascript Interview