Smashing Boxes interview question

Asked to complete a code sample.