This Javascript function seems to use the while loop in an asynchronous way. Is it the correct way to use while loops with asynchronous conditions?
var Boo
Yep, it's fine to do it like this:
let stopped = false // infinite loop while(!stopped) { let res = await fetch('api link') if (res.something) stopped = true // stop when you want }