diff --git a/doc/api/stream.md b/doc/api/stream.md index 966c69c5117022..f6cd6a5f05d257 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1000,7 +1000,7 @@ readable.on('readable', function() { // There is some data to read now. let data; - while (data = this.read()) { + while ((data = this.read()) !== null) { console.log(data); } });