📜  js字符串到charcode数组 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:18.105000             🧑  作者: Mango

代码示例2
let input = "words".split("");
let output = [];
input.forEach(letter => {
    output.push(letter.charCodeAt(0))
});
console.log(output) //[119, 111, 114, 100, 115]