Sascha Schulz
vor 5 Tagen c98907289eb9db87a5bea37f2e2c39d6d1f59ce5
1
2
3
4
5
6
7
const contestants = [
    new Promise((r) => setTimeout(() => r("a"), 1000)),
    new Promise((r) => setTimeout(() => r("b"), 1000)),
    new Promise((r) => setTimeout(() => r("c"), 1000))
];
 
(async () => console.log(await Promise.race(contestants)))();