doc: fix buf.length slice example

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>
This commit is contained in:
Chinedu Francis Nwafili authored and Roman Reiss committed 2016-02-18 03:17:44 +01:00
1 parent 069072c4bf
commit 0cb0287f8a
1 file changed
+1 -1
+1 -1
View File
@@ -619,7 +619,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