Buffer.concat Example

Buffer.concat Example

Easy NodeJS Streams & Buffers 31 views
Explanation Complexity

Problem Statement

Join multiple buffers and print final text.

Input Format

No input.

Output Format

Print text.

Constraints

Use Buffer.concat.

Input / Output Format

Input Format
No input.
Output Format
Print text.
Constraints
Use Buffer.concat.

Examples

Input:
Output:
meetcode

Example Solution (Public)

NodeJS
const parts = [Buffer.from('meet'), Buffer.from('code')];
const out = Buffer.concat(parts);
console.log(out.toString('utf8'));

Official Solution Code

const parts = [Buffer.from('meet'), Buffer.from('code')];
const out = Buffer.concat(parts);
console.log(out.toString('utf8'));
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.