|
|
|
@ -47,6 +47,9 @@ function countChars(string) {
|
|
|
|
|
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 (currentChar.charCodeAt(0) == 32) {
|
|
|
|
|
currentChar = "whitespace"
|
|
|
|
|
}
|
|
|
|
|
if (letterCount[i] > 0) {
|
|
|
|
|
outputString += "Number of " + currentChar + "'s: " + letterCount[i] + "\n";
|
|
|
|
|
}
|
|
|
|
|