mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: fix buffer[index] example
PR-URL: https://github.com/nodejs/node/pull/5253 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
committed by
Roman Reiss
parent
51bd77022b
commit
069072c4bf
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user