Pregunta de entrevista de Code Ninjas

javascript question and problem solving