projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59e55ae
)
doc: fix buf.length slice example
author
Chinedu Francis Nwafili
<frankie.nwafili@gmail.com>
Tue, 16 Feb 2016 14:42:29 +0000
(09:42 -0500)
committer
Myles Borins
<mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000
(14:01 -0800)
Previously tried to reassign a const.
PR-URL: https://github.com/nodejs/node/pull/5259
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
doc/api/buffer.markdown
patch
|
blob
|
history
diff --git
a/doc/api/buffer.markdown
b/doc/api/buffer.markdown
index
a7698b9
..
ac8b564
100644
(file)
--- a/
doc/api/buffer.markdown
+++ b/
doc/api/buffer.markdown
@@
-604,7
+604,7
@@
modify the length of a Buffer should therefore treat `length` as read-only and
use [`buf.slice()`][] to create a new Buffer.
```js
-
const
buf = new Buffer(10);
+
var
buf = new Buffer(10);
buf.write('abcdefghj', 0, 'ascii');
console.log(buf.length);
// Prints: 10