Imagine you have a team array of Codémon objects, and you want a simple array containing only their names — or only their levels. The .map() method transforms each object into the exact value you return:
↗️
Loading editor...
↶
↷
Combined with parameter destructuring, extracting a property becomes even shorter and cleaner: