typescript async await in loop code example
Example: foreach async typescript
for (const file of files) {
const contents = await fs.readFile(file, 'utf8');
console.log(contents);
}
for (const file of files) {
const contents = await fs.readFile(file, 'utf8');
console.log(contents);
}