Question d’entretien chez Boomi

coding question in JS: write a function to flatten a nested array