Tiffany White's public fiddles

  • Century from Year #1 is the latest revision

    Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc.

  • Falsy Bouncer #1 is the latest revision

    Remove all falsy values from an array. Falsy values in JavaScript are false, null, 0, "", undefined, and NaN.

  • Mutations

    Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.

  • Slasher Flick #1 is the latest revision

    Return the remaining elements of an array after chopping off n elements from the head. The head means the beginning of the array, or the zeroth index.

  • Chunky Monkey

    Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a two-dimensional array.

  • Repeat a string repeat a string

    Repeat a given string (first argument) num times (second argument). Return an empty string if num is not a positive number.

  • Confirm the Ending

    Check if a string (first argument, str) ends with the given target string (second argument, target). This challenge can be solved with the .endsWith() method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.

  • Return Largest Numbers in Arrays

    Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.

  • Title Case a Sentence

    Return the provided string with the first letter of each word capitalized. Make sure the rest of the word is in lower case. For the purpose of this exercise, you should also capitalize connecting words like "the" and "of".

  • Find the Longest Word in a String

    Return the length of the longest word in the provided sentence. Your response should be a number.

  • Check for Palindromes

    Return true if the given string is a palindrome. Otherwise, return false.

  • Factorialize a Number

    Return the factorial of the provided integer. If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n. Factorials are often represented with the shorthand notation n! For example: 5! = 1 * 2 * 3 * 4 * 5 = 120

  • Reverse a String, freeCodeCamp

    Reverse the provided string. You may need to turn the string into an array before you can reverse it. Your result must be a string.

  • Reverse Arrays with reverse

    Use reverse to reverse the array variable and assign it to newArray.

  • Sort Arrays with sort

    Use sort to sort array from largest to smallest. Further explanation on the .sort() method can be found here

  • Filter arrays with filter, freeCodeCamp

    Use filter to create a new array with all the values from oldArray which are less than 6. The oldArray should not change.

  • Condense Arrays with reduce, freeCodeCamp

    Use the reduce method to sum all the values in array and assign it to singleVal.

  • Iterate over Arrays with map from freeCodeCamp #3 is the latest revision

    The map method will iterate through every element of the array, creating a new array with values that have been modified by the callback function, and return it. Note that it does not modify the original array. In our example the callback only uses the value of the array element (the val argument) but your callback can also include arguments for the index and array being acted on. Use the map function to add 3 to every value in the variable oldArray, and save the results into variable newArray. oldArray should not change.

  • Hello World from exercism.io

    Hello World The classical introductory exercise. Just say "Hello, World!". "Hello, World!" is the traditional first program for beginning programming in a new language or environment. The objectives are simple: Write a function that returns the string "Hello, World!". Run the test suite and make sure that it succeeds. Submit your solution and check it at the website. If everything goes well, you will be ready to fetch your first real exercise.