Skip to content
loading...

re: Object Lookups over Switch Statements and If/Else Conditionals VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just in case you ever use a switch, the default case should be used to throw an error to reflect an unexpected state.
 

Yes in this case, not found. I agree it should have proper error handling but I'm not going to go into that for the purposes of this example.

code of conduct - report abuse