Skip to content

Commit b209250

Browse files
authored
Merge pull request #28 from Rishabh-Singh-01/typo-fix
Update open_file to read_file in ch03
2 parents b3b652e + 8342201 commit b209250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapters/ch03-working-with-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ Getting line -> open_file();
663663
File handle 20 closed
664664
```
665665

666-
The code above has a function called `open_file` that does three things: open a file, read each line, and show each line on the console.
666+
The code above has a function called `read_file` that does three things: open a file, read each line, and show each line on the console.
667667

668668
This function uses the `fs` module. It opens a read-only file and creates a stream to read it. The function can read only some lines using the `start` and `end` options. The function also needs to know the file's characters using the `encoding` option.
669669

0 commit comments

Comments
 (0)