diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 1da5bb83cb4303..a7698b9d18e020 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -351,7 +351,7 @@ for (var i = 0; i < str.length ; i++) { buf[i] = str.charCodeAt(i); } -console.log(buf); +console.log(buf.toString('ascii')); // Prints: Node.js ```