mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
docs(examples): improve cat example (#10498)
This commit is contained in:
parent
820c658ff8
commit
f44a5706e6
1 changed files with 1 additions and 2 deletions
|
@ -21,8 +21,7 @@ is opened, and printed to stdout (e.g. the console).
|
||||||
/**
|
/**
|
||||||
* cat.ts
|
* cat.ts
|
||||||
*/
|
*/
|
||||||
for (let i = 0; i < Deno.args.length; i++) {
|
for (const filename of Deno.args) {
|
||||||
const filename = Deno.args[i];
|
|
||||||
const file = await Deno.open(filename);
|
const file = await Deno.open(filename);
|
||||||
await Deno.copy(file, Deno.stdout);
|
await Deno.copy(file, Deno.stdout);
|
||||||
file.close();
|
file.close();
|
||||||
|
|
Loading…
Reference in a new issue