Skip to content

Commit c48290d

Browse files
chinedufnrvagg
authored andcommitted
doc: fix buf.length slice example
Previously tried to reassign a const. PR-URL: #5259 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent a6e437c commit c48290d

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
@@ -619,7 +619,7 @@ modify the length of a Buffer should therefore treat `length` as read-only and
619619
use [`buf.slice()`][] to create a new Buffer.
620620

621621
```js
622-
const buf = new Buffer(10);
622+
var buf = new Buffer(10);
623623
buf.write('abcdefghj', 0, 'ascii');
624624
console.log(buf.length);
625625
// Prints: 10

0 commit comments

Comments
 (0)