const string = 'hi there';
const usingSplit = string.split('');
const usingSpread = [...string];
const usingArrayFrom = Array.from(string);
const usingObjectAssign = Object.assign([], string);
// Result
// [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e' ]
string = s.join("");
let input = "words".split("");
let output = [];
input.forEach(letter => {
output.push(letter.charCodeAt(0))
});
console.log(output) //[119, 111, 114, 100, 115]
[..."text"].map(letter=>letter.charCodeAt(0))