1. What is the Buffer class in Node.js?
The Buffer class is used to handle binary data directly, especially in file streams or TCP connections. Buffers are similar to arrays of integers but represent raw memory. This allows efficient reading and writing of binary data.
const buf = Buffer.from('Hello');
console.log(buf.toString());