Write your own function to flatten a nested array. | Array Operations | javascript Interview Questions | NextRound.in