diff --git a/pages/articles/file-system/how-to-read-files-in-nodejs/content.md b/pages/articles/file-system/how-to-read-files-in-nodejs/content.md index 27e63aa..5a5cc03 100644 --- a/pages/articles/file-system/how-to-read-files-in-nodejs/content.md +++ b/pages/articles/file-system/how-to-read-files-in-nodejs/content.md @@ -5,7 +5,7 @@ Reading the contents of a file into memory is a very common programming task, an // file = (string) filepath of the file to read -`encoding` is an optional parameter that specifies the type of encoding to read the file. Possible encodings are 'ascii', 'utf8', and 'base64'. If no encoding is provided, the default is `utf8`. +`encoding` is an optional parameter that specifies the type of encoding to read the file. Possible encodings are 'ascii', 'utf8', and 'base64'. If no encoding is provided, the default is `null`. `callback` is a function to call when the file has been read and the contents are ready - it is passed two arguments, `error` and `data`. If there is no error, `error` will be `null` and `data` will contain the file contents; otherwise `err` contains the error message.