JS 通过ASCII创建 26个字母

const letterArr = [];
for (let code = 65; code < 91; code++) {
// fromCharCode方法 可以将对应的ASCII转换
letterArr.push(String.fromCharCode(code));
}
console.log(letterArr);

posted @ 2020-11-30 16:08  Ssinoo団子  阅读(190)  评论(0编辑  收藏  举报