diff --git a/doc/api/buffer.md b/doc/api/buffer.md index be5d49875ab471..0e25989c846253 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -222,7 +222,7 @@ function: Buffers can be iterated over using the ECMAScript 2015 (ES6) `for..of` syntax: ```js -const buf = Buffer(.from[1, 2, 3]); +const buf = Buffer.from([1, 2, 3]); for (var b of buf) console.log(b)