now and then I face a command where I need many ifs (to simulate a switch command) ... and the command does not look efficient ...
today I had this idea to make this very simple. By replace the multiple ifs with values from a map ....
images explain it all ...
for sure for 3 ifs is not a big deal, apart from being neat ... but in case of 50, this will be a big difference