From 59741a9beeb0ccaac6fc3247605bf090d36ad50e Mon Sep 17 00:00:00 2001 From: "Hargobind S. Khalsa" Date: Sun, 17 Jul 2016 16:01:52 -0600 Subject: [PATCH] doc: correct sample output of buf.compare Comparing the buffers `ABC` and `ABCD` returns `-1` not `1`. PR-URL: https://github.com/nodejs/node/pull/7777 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index bd982dfabaf..f0104207c50 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -815,7 +815,7 @@ console.log(buf1.compare(buf1)); console.log(buf1.compare(buf2)); // Prints: -1 console.log(buf1.compare(buf3)); - // Prints: 1 + // Prints: -1 console.log(buf2.compare(buf1)); // Prints: 1 console.log(buf2.compare(buf3));