You can do the same with a for..in loop to iterate on an object. You need to place the loop in an async function, then you can use await and the loop stops the iteration until the promise we’re awaiting resolves.
Sort: