Skip to content

Commit

Permalink
buffer: fix a typo in Buffer example code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
c0b authored and derek committed Apr 24, 2016
1 parent 8dc1d5e commit ebfd4a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ebfd4a5

Please sign in to comment.