Pregunta de entrevista de Capgemini

Deep nested array , we have to flatten it without flat method in javascript.