Skip to content

Commit 8c732ad

Browse files
chinedufnMyles Borins
authored andcommitted
doc: fix buf.length slice example
Previously tried to reassign a const. PR-URL: #5259 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 6c27c78 commit 8c732ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ modify the length of a Buffer should therefore treat `length` as read-only and
604604
use [`buf.slice()`][] to create a new Buffer.
605605

606606
```js
607-
const buf = new Buffer(10);
607+
var buf = new Buffer(10);
608608
buf.write('abcdefghj', 0, 'ascii');
609609
console.log(buf.length);
610610
// Prints: 10

0 commit comments

Comments
 (0)