VPPromiseRace implementation is not correct, it simply returns the last one. We can fix it by keeping a flag, which will set to true on first then or catch after that it will not trigger resolve or reject any more.Comment·Article·Feb 22, 2023·Javascript Interview Questions ( Promises and its Polyfills )