Some arrays contain arrays, and sometimes each string needs to turn into multiple pieces. flat() and flatMap() help with those two related problems.
const nested = [[1, 2], [3, 4]];
const flatNumbers = nested.flat();
const words = ['hello world', 'js'].flatMap((item) => item.split(' '));
Use flat() to collapse one level of nested arrays.