Skip to content

Commit ebfd4a5

Browse files
c0bderek
authored andcommitted
buffer: fix a typo in Buffer example code
it shows `Buffer(.from[1, 2, 3]);` but that doesn't run; should be a typo https://nodejs.org/dist/latest-v5.x/docs/api/buffer.html#buffer_buffers_and_es6_iteration resolve comment in c1534e7#commitcomment-17228215 the same doc in master 85ab4a5 is correct.
1 parent 8dc1d5e commit ebfd4a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function:
222222
Buffers can be iterated over using the ECMAScript 2015 (ES6) `for..of` syntax:
223223

224224
```js
225-
const buf = Buffer(.from[1, 2, 3]);
225+
const buf = Buffer.from([1, 2, 3]);
226226

227227
for (var b of buf)
228228
console.log(b)

0 commit comments

Comments
 (0)