const array = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
const string = "abcdefghijklmnopqrstuvwxyz";
// random item from Array
console.log(array[Math.floor(Math.random() * array.length)]);
// random Char from String
console.log(string[Math.floor(Math.random() * string.length)]);
const alphabet = "abcdefghijklmnopqrstuvwxyz"
const randomCharacter = alphabet[Math.floor(Math.random() * alphabet.length)]
let myName = 'yourname';
let randomChar = Math.trunc(Math.random() * myName.length);
console.log(myName.charAt(randomChar));