Comment Comment by ramesh31 The switch case is still a bit redundant and inelegant, particularly considering how out of place switch case syntax feels in a Javascript codebase in general. Early returns are the way to go. parent ramesh31 5 years ago