Webtretho interview question

Coding interview with javascript-specific problems