let str = "hello world"
let buffer = Buffer.alloc(2, str) // replace 2 by 1 for the first char
console.log(buffer.toString('utf-8')) // display he
console.log(buffer.toString('utf-8').length) // display 2
let userEmail = "email";
console.log(userEmail[0]); // e
console.log(userEmail.charAt(0)); // e
console.log(userEmail.slice(0, 1)); // e
console.log(userEmail.substring(0, 1)); // e
console.log(userEmail.substr(0, 1)); // e
console.log(userEmail.split("", 1).toString()); // e
console.log(userEmail.match(/./)[0]); // e