demo_met_buffer_concat.js:
var buf1 = Buffer.from('a'); var buf2 = Buffer.from('b'); var buf3 = Buffer.from('c'); var arr = [buf1, buf2, buf3]; //Join the array into one buffer object: var buf = Buffer.concat(arr); console.log(buf);
C:\Users\My Name>node demo_met_buffer_concat.js
<Buffer 61>, <Buffer 62>, <Buffer 63>