コードコピーは次のとおりです。
/**
*ランダムな小文字を返します
*/
関数getLowerCharacter(){
return getCharacter( "lower");;
}
/**
*ランダムな大文字を返します
*/
function getupperCharacter(){
return getCharacter( "upper");;
}
/**
*手紙を返します
*/
関数getCharacter(flag){
var文字= "";
if(flag === "lower"){
文字= string.fromCharcode(math.floor(math.random() * 26) + "a" .charcodeat(0));
}
if(flag === "upper"){
文字= string.fromCharcode(math.floor(math.random() * 26) + "a" .charcodeat(0));
}
return文字;
}