JS array .flat() and .flatMap() methods

preview_player
Показать описание
JavaScript array .flat() method returns a new array that combines all nested array into the same array level.

JavaScript array .flatMap() method is a combination of array .map() and .flat() method.
Рекомендации по теме