From ebfd4a52feb0e819904f544e3aef65dbaa5ffc00 Mon Sep 17 00:00:00 2001 From: Mr C0B Date: Sun, 24 Apr 2016 11:13:35 -0700 Subject: [PATCH] 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 https://github.com/nodejs/node/commit/c1534e7#commitcomment-17228215 the same doc in master 85ab4a5 is correct. --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)