Merge branch 'master' of ssh://gitea.calebfontenot.com:25566/CCF_100/NoMoreAcronyms

master
Chloe Fontenot 🏳️‍⚧️ 2023-04-04 17:40:29 +07:00
commit 186fc94040
1 changed files with 5 additions and 1 deletions

@ -43,8 +43,12 @@ function countChars(string) {
letterCount[arrayIndex]++;
}
for (let i = 0; i < letterCount.length; ++i) {
let currentChar = String.fromCharCode(i).toUpperCase();;
if (currentChar.charCodeAt(0) == 10 || currentChar.charCodeAt(0) == 13 || currentChar.charCodeAt(0) == 30 || currentChar.charCodeAt(0) == 115 || currentChar.charCodeAt(0) == 21 || currentChar.charCodeAt(0) == 118) {
currentChar = "newline";
}
if (letterCount[i] > 0) {
outputString += "Number of " + String.fromCharCode(i).toUpperCase() + "'s: " + letterCount[i] + "\n";
outputString += "Number of " + currentChar + "'s: " + letterCount[i] + "\n";
}
}
return outputString;