Skip to content

Instantly share code, notes, and snippets.

@bral
Created December 10, 2015 01:20
Show Gist options
  • Save bral/0e2013c56c22bcddb05e to your computer and use it in GitHub Desktop.
Save bral/0e2013c56c22bcddb05e to your computer and use it in GitHub Desktop.
- Write a function that takes in a string, and returns the reverse of that string
- Write a function that accepts a string and returns the longest word in that string.
- Write a function that accepts a string and returns that string after capitalizing every word of that string
- Write a function that accepts a string and returns how many vowels are in that string.
-Write a function that accepts a string and returns true if that string is a palindrome (written the same forward and backwards).
- Write a function that takes a string and returns an object with the key being the specific letter and the value being how many times the specific letter is found in the string.
- Write a function that accepts a string and returns a new string with every characters case (lower or upper) swapped.
- Write a method called 'unsplit' that you can call on every instance of an array and have it do the opposite of 'split' (turn an Array into a string). Also have your method accept an argument and use that argument as the delimiter between your array elements. *If you're familiar with JavaScript you're basically recreating the join method (without actually using .join())
- Write a person Constructor that has a name and an age property and then create two instances of Person. (Lingo test)
- make this work [1,2,3,4,5].duplicate(); // returns --> [1,2,3,4,5,1,2,3,4,5]
- Recreate underscore’s ‘each’ function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment