From 0cb0287f8a50633c23aa38f72aace5c864f7dfd2 Mon Sep 17 00:00:00 2001 From: Chinedu Francis Nwafili Date: Tue, 16 Feb 2016 09:42:29 -0500 Subject: [PATCH] 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 Reviewed-By: Trevor Norris Reviewed-By: Roman Reiss --- doc/api/buffer.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index f79ac723859..ab1ee5a6c07 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -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