diff options
author | vwkd <33468089+vwkd@users.noreply.github.com> | 2021-05-05 06:07:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 13:07:08 +0900 |
commit | f44a5706e63cc8c9dad68d853dff36448ec45909 (patch) | |
tree | bc3fa6a240f360a870dd1e8dd8dac9fa146bfd47 | |
parent | 820c658ff8c1940be0e8147e587ed8e8eb0359a5 (diff) |
docs(examples): improve cat example (#10498)
-rw-r--r-- | docs/examples/unix_cat.md | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/examples/unix_cat.md b/docs/examples/unix_cat.md index b8c6c0d21..fc09d4e27 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(); |