UQAM interview question

Tested my knowledge of javascript.