CC-11: Objects
with Carmen Salas • 2024/10/22
Code Challenge
Write a function named
charCount
that takes in a string and returns an object where the keys are letters in the string and the value of each key is a count of how many times the character appears in the string.
2+3 (BONUS: Refactor into for...off
). Write a function named letterCount
that takes in a string and returns an object where the keys are letters in the string and the value of each key is a count of how many times the character appears in the string, not including empty spaces.
Write a function named
vowelCount
that takes in a string and returns an object where the keys are letters in the given string that are vowels and the value of each vowel key is a count of how many times the character appears in the string.
Last updated