Skip to content

Commit 59741a9

Browse files
khalsahcjihrig
authored andcommitted
doc: correct sample output of buf.compare
Comparing the buffers `ABC` and `ABCD` returns `-1` not `1`. PR-URL: #7777 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 5cdbbdf commit 59741a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ console.log(buf1.compare(buf1));
815815
console.log(buf1.compare(buf2));
816816
// Prints: -1
817817
console.log(buf1.compare(buf3));
818-
// Prints: 1
818+
// Prints: -1
819819
console.log(buf2.compare(buf1));
820820
// Prints: 1
821821
console.log(buf2.compare(buf3));

0 commit comments

Comments
 (0)