js で 26 個の英語文字を生成する方法
js で 26 個の英語文字を生成する方法。
const alphabets = [];
const start = 'a'.charCodeAt(0);
for(let i = 0; i < 26; i++) {
alphabets.push(String.fromCharCode(start + i));
}
js で 26 個の英語文字を生成する方法。
const alphabets = [];
const start = 'a'.charCodeAt(0);
for(let i = 0; i < 26; i++) {
alphabets.push(String.fromCharCode(start + i));
}