Pergunta de entrevista da empresa Better

Javascript based coding question which involves closures and currying.