Skip to content

Commit 9992048

Browse files
c0bclaudiorodriguez
authored andcommitted
buffer: fix a typo in Buffer example code
fixes `Buffer(.from[1, 2, 3])` into `Buffer.from(...)` (v5.x only) https://nodejs.org/dist/latest-v5.x/docs/api/buffer.html Commented in: c1534e7#commitcomment-17228215 PR-URL: #6361 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent ca215b9 commit 9992048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.md

+1-1
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)