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...

Markdown supported · ⌘↵ to post
No responses yet.