生成26个字母

const alphabet=Array.from(new Array(26),(ele,index)=>{
    return String.fromCharCode(65+index);
})
  console.log(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"]

  

posted @ 2020-08-05 15:32  Haoyin-杰克  阅读(258)  评论(0编辑  收藏  举报