From 919503d95f0954817f0efc5f665143cfb2edef81 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Wed, 10 Mar 2021 17:41:08 +0100 Subject: [PATCH] Replace map with for statement --- src/example.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/example.ts b/src/example.ts index 5fee7b7..102656d 100644 --- a/src/example.ts +++ b/src/example.ts @@ -90,7 +90,7 @@ async function main() { ); // Get game data - gameList.map(async (gamename) => { + for (const gamename of gameList) { console.log(`Searching '${gamename}'...`); // Prepare the query @@ -109,5 +109,5 @@ async function main() { const authors = gamedata.authors.map((a, idx) => a.name).join(", "); console.log(`Found: ${gamedata.name} (${gamedata.version}) by ${authors}\n`); } else console.log(`No data found for '${gamename}'\n`); - }); + } }