Module 8 · Objects, Destructuring, Spread and JSON
When to Use an Object: Against a Map, an Array of Pairs and a Class
Free with an accountReading
Kenji is reviewing a pull request. It stores a bus company's seats three different ways in three files. One file keeps an object from a passenger's name to a seat. Another keeps a Map. A third keeps an array of [name, seat] pairs and searches it with find. All three work on the test data. Kenji has to say which one should stay, and why.
Checking what this lesson needs for you…
What is inside When to Use an Object: Against a Map, an Array of Pairs and a Class
- Two jobs that look alike
- An object against a Map
- An object against an array of pairs
- An object against a class
- Choosing by four questions
- The comparison table