From f44a5706e63cc8c9dad68d853dff36448ec45909 Mon Sep 17 00:00:00 2001 From: vwkd <33468089+vwkd@users.noreply.github.com> Date: Wed, 5 May 2021 06:07:08 +0200 Subject: [PATCH] docs(examples): improve cat example (#10498) --- docs/examples/unix_cat.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/examples/unix_cat.md b/docs/examples/unix_cat.md index b8c6c0d21c..fc09d4e279 100644 --- a/docs/examples/unix_cat.md +++ b/docs/examples/unix_cat.md @@ -21,8 +21,7 @@ is opened, and printed to stdout (e.g. the console). /** * cat.ts */ -for (let i = 0; i < Deno.args.length; i++) { - const filename = Deno.args[i]; +for (const filename of Deno.args) { const file = await Deno.open(filename); await Deno.copy(file, Deno.stdout); file.close();