Aristocrat interview question

Promises in javascript