Challange 0: Tell the truth
Write a function that returns the number of truthy values in a given array. Return 0 if given an empty array.// Examples
countTruthy([true, false, false, true, false]) // ➞ 2
countTruthy([false, false, false, false]) // ➞ 0
countTruthy([]) // ➞ 0
Challenge 1: Count Syllables
Create a function that counts the number of syllables a word has. Each syllable is separated with a dash `-`.numberSyllables("buf-fet") ➞ 2
numberSyllables("beau-ti-ful") ➞ 3
numberSyllables("mon-u-men-tal") ➞ 4
numberSyllables("on-o-mat-o-poe-ia") ➞ 6
Challenge 2: The Fizz Buzz Test
Write a method that returns an array of all the numbers from 1 to an integer argument. But for multiples of three use “Fizz” instead of the number and for the multiples of five use “Buzz”. For numbers which are multiples of both three and five use “FizzBuzz”.fizzBuzz(10) ➞ [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz"]
fizzBuzz(15) ➞ [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz"]
Challenge 3: Reverse the Odd Length Words
Given a string, reverse all the words which have odd length. The even length words are not changed.reverseOdd("Bananas") ➞ "sananaB"
reverseOdd("One two three four") ➞ "enO owt eerht four"
reverseOdd("Make sure uoy only esrever sdrow of ddo length")
➞ "Make sure you only reverse words of odd length"