Browse Source

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 <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v4.x
Hargobind S. Khalsa 9 years ago
committed by Myles Borins
parent
commit
3ad74089f5
  1. 2
      doc/api/buffer.md

2
doc/api/buffer.md

@ -757,7 +757,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));

Loading…
Cancel
Save