EPAM Systems Interview Question

Explain promise and write code for promises & its related methods.