JavaScript · Junior · Question 47 of 75

How does Map differ from a plain object?

Explanation

Object keys are strings or symbols (the number 1 becomes '1'), and there are inherited properties. Map accepts objects as keys, has size and get/set/has/delete, and is convenient for frequent additions and removals.

Further reading

Problem with a question

JavaScript · Junior · question 47

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz