javascript program to convert the length of a string in bytes code example
Example: js get string byte size
// JavaScript
(new Blob(['20€'])).size; // 5
// Node js
Buffer.from('20€').length; // 5
// JavaScript
(new Blob(['20€'])).size; // 5
// Node js
Buffer.from('20€').length; // 5