Count how many vowels and consonants occur in a string: Difference between revisions
Content added Content deleted
m (→JS :: Count of "Vowels and Consonants" ?: Preferred Array.from to String.split) |
|||
Line 354: | Line 354: | ||
// countOfVowelsAndConsonants :: String -> Int |
// countOfVowelsAndConsonants :: String -> Int |
||
const countOfVowelsAndConsonants = s => |
const countOfVowelsAndConsonants = s => |
||
Array.from(s).filter(isAlpha).length; |
|||