Pregunta de entrevista de LivePerson

Recursion and iterative problems in JavaScript