const x = Promise.race([
new Promise(resolve => { while(true);}),
new Promise(resolve => { let i = 0; while((i++)<100);console.log(2); resolve(); }),
new Promise(resolve => { let i = 0; while((i++)<2000);console.log(3); resolve(); }),
]);
console.log('This line ran');
I thought promises are asynchronous.But the code above doesn't print anything.
I tried replacing Promise.race() with Promise.all() yet no output.