0

This is a silly example, I'm not good at syntax I try to understand how to make it work with async as it doesn't (beware I need the map):

  const list = ["hello", "world"]
    

  async function test() {

    let allTexts = Promise.all(list.map(async word => word.upperCase()));
    return allTexts;
  }

  test().then(result => alert(result.join('')))

Solved through comments below : use then + Use toUpperCase instead. – evolutionxbox

user310291
  • 36,946
  • 82
  • 271
  • 487

0 Answers0