Skip to content

Commit 4b320ad

Browse files
khalsahevanlucas
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 f97aa4b commit 4b320ad

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
@@ -806,7 +806,7 @@ console.log(buf1.compare(buf1));
806806
console.log(buf1.compare(buf2));
807807
// Prints: -1
808808
console.log(buf1.compare(buf3));
809-
// Prints: 1
809+
// Prints: -1
810810
console.log(buf2.compare(buf1));
811811
// Prints: 1
812812
console.log(buf2.compare(buf3));

0 commit comments

Comments
 (0)