How to flatten multi-dimensional arrays 😋
You can easily flatten multi-dimensional arrays using the "flat()" method but flat method only flattens the first level in the multi-dimensional array,
But you can flatten any level of multi-dimensional arrays by passing 'Infinity' in the flat() method.