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 2016-02-16 09:42:29 -05:00 committed by Roman Reiss
parent 069072c4bf
commit 0cb0287f8a

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