Design a Promise-like class with methods to manually resolve or reject, and to attach callbacks.
Asked in frontend interviews at Microsoft, Google, Amazon and 1 more