Front interview question

How to flatten a nested (recursively nested) array.