Hey everyone, I’ve been making my way through some practice exercises and I’m stuck on the last exercise. The exercises below ask to not use console.log when calling the function, and I have no clue on how to call the function so that it produces an outcome:
- Write a function that returns the number of digits in a number. For example, there are 3 digits in the number 104.
- Write a function that gives how many of a certain letter there are in a word. For example, there are 3 occurrences of the letter “a” in the word “cake spatula”.
- Write a function that takes one string and one number, and that returns True or False based on whether the length of the string is bigger than the number.
Thanks in advance for any help!