LoginSignup
0
1

More than 1 year has passed since last update.

【JavaScript】数字をアルファベットに変換する

Posted at

数字をアルファベットに変換(1→A,2→B,……,26→Z)する関数です。

// 数字→アルファベット変換
function ChangeNumberToAlphabets(number){
    const alphabet = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
    const alphabets = alphabet.split(",");

    return alphabets[number - 1];
}
0
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1