How I make sense of .flatMap():
– .map(): Each input element corresponds to one output element.
– .flatMap(): Each input element corresponds to zero or more output elements.
More information, uses cases and examples: https://exploringjs.com/js/book/ch_arrays.html#Array.prototype.flatMap