Pergunta de entrevista da empresa SSENSE

A pieces of JS code asking you to debug, quite easy