foreach async typescript
for (const file of files) {
const contents = await fs.readFile(file, 'utf8');
console.log(contents);
}
foreach async typescript
for (const file of files) {
const contents = await fs.readFile(file, 'utf8');
console.log(contents);
}
async foreach
[1, 2, 3].forEach(async (num) => { await waitFor(50); console.log(num);});console.log('Done');
foreach await js
async function printFiles () {
const files = await getFilePaths();
for (const file of files) {
const contents = await fs.readFile(file, 'utf8');
console.log(contents);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us