diff --git a/doc/api/buffer.md b/doc/api/buffer.md index b5c1e9895d1fdc..7ca33c0b8f14a7 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -939,6 +939,10 @@ The index operator `[index]` can be used to get and set the octet at position `index` in `buf`. The values refer to individual bytes, so the legal value range is between `0x00` and `0xFF` (hex) or `0` and `255` (decimal). +This operator is inherited from `Uint8Array`, so its behavior on out-of-bounds +access is the same as `UInt8Array` - that is, getting returns `undefined` and +setting does nothing. + Example: Copy an ASCII string into a `Buffer`, one byte at a time ```js