CodeZettaInterview Hub

Node.js · Buffers · Fresh / Intern · Concept

What is a Buffer in Node.js?

Short Interview Answer

A fixed-length sequence of bytes for binary data, backed by outside-V8 memory (historically) / ArrayBuffer views.

Detailed Explanation

Used for file, network, and crypto data. Encoding matters when converting to/from strings. Never treat untrusted Buffers as UTF-8 blindly without validation.

Did you know this answer?