Pregunta de entrevista de Altametrics

Presented me with a more complex typescript question