Array.prototype.flatMap() Method in Javascript

preview_player
Показать описание
flatMap() method is identical to map() method followed by flat() method of depth 1.
flatMap() method first of all maps each element using a mapping function then flattens the result into a new array.
Рекомендации по теме