Buffer From String
NodeJS
Easy
4 views
Problem Description
Create a Buffer from a string and print its byte length.
Output Format
Print integer.
Constraints
Use utf8 encoding.
Official Solution
const buf = Buffer.from('meetcode', 'utf8');
console.log(buf.length);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!