await in simple for loop javascript

31 Views Asked by At

I have to generate n signatures. For that I must invoke a promise n number of times. Do I have to use Promise.all? Is there another way?

const response = [];
for( let i = 0; i < n; i++ ){
    response.push(await generateSignature())
}

this gives me an eslint issue no-await-in-loop.

0

There are 0 best solutions below