Using objects as key/value storage
Objects can be considered as key/value storage, like a dictionary. If you have tabular data, you can use an object to look up values rather than a switch statement or an if/else chain. This is most useful when you know that your input data is limited...
developerabdullah.hashnode.dev1 min read