Pregunta de entrevista de Simplicity Consulting

Code this for me and expalin why