Pregunta de entrevista de Paytm

Array and Ovject flatten code. Not to use ES6 features