Skip to content

doc: correct my wrong note about buf.fill()

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, I've misinterpreted this operation:

https://github.com/nodejs/node/blob/c1ac57888199ba13df7eda4912cdb53dcfb5a2ee/src/node_buffer.cc#L566

> Buffer.alloc(5).fill(255)
<Buffer ff ff ff ff ff>
> Buffer.alloc(5).fill(256)
<Buffer 00 00 00 00 00>
> Buffer.alloc(5).fill(257)
<Buffer 01 01 01 01 01>
> Buffer.alloc(5).fill(258)
<Buffer 02 02 02 02 02>

Merge request reports

Loading