diff --git a/doc/api/stream.md b/doc/api/stream.md index bd4573e487f1ad..77afb18ff566f2 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1035,7 +1035,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); } });