Node.js · Middle · Question 16 of 75
What is a Buffer?
- 1A queue of pending promises
- 2A cache for HTTP responses
- ✓Correct answer: A fixed-length sequence of bytes, a subclass of
Uint8Array
Explanation
Buffers hold binary data: file contents, network packets, images. Convert with buf.toString("utf8") or Buffer.from(text, "utf8").