EPAM Systems interview question

JS core: closures, promises, etc.