1 for (const file of files) {
2 const contents = await fs.readFile(file, 'utf8');
3 console.log(contents);
4 }
5
1[1, 2, 3].forEach(async (num) => { await waitFor(50); console.log(num);});console.log('Done');
1async function printFiles () {
2 const files = await getFilePaths();
3
4 for (const file of files) {
5 const contents = await fs.readFile(file, 'utf8');
6 console.log(contents);
7 }
8}
9