Pregunta de entrevista de Smashing Boxes

Asked to complete a code sample.