Casestatement if you are going to have many
else ifstatements or the condition is not inherently boolean in nature (like the value of a string, for example).
dictionaryand call it a
switcher. You can read more about that on your own:
defaultcase. You will need to scroll down in the example or open it in a new window due to the length.
switchstatement is not used on boolean values. It is strictly meant for multiple options similar to a menu or list. General rule of thumb - when your code is a bunch of
if...else ifstatements, it might be better suited for a
switchstatement unless you are using boolean operators (&& and ||).