Function code challenges and tests
- libs
- test
-
caltulator - self explainitory
-
firstDuplicate - given a string, it returns the first letter with its first duplicate in smaller index
-
firstNonDuplicate - given a string, it returns the first encountered letter that does not have a duplicate
-
firstSwap - gieven an array, swaps the first and second indexes
-
justNumbers - given an array, it returns an array of only the numbers
-
lastSwap - given an array, swaps the last index and first index
-
sortArr - given an array of numbers, returns the sorted number in ascending order without the use of the sort built in function
-
totalAmount - given an array of numbers, returns the sum of all the numbers
-
vowelsCount - given an array of numbers and/or vowels, it returns the number of vowels
-
lastFiveChars - given a string of either numbers or mixed, it returns the last five characters of the string
-
findByLastFiveChars - given a list of users with IDs, it returns the one that matches the passed in five characters
-
camelCase - given a string it should return it in camel case
-
whereMyAnagramsAt - given two arguments, a word and a list of words, it should return all the matching anagrams
-
generateHashtags - given a string, function must return it in hashtag format or false if the string is empty or longer/equal to 140 char
-
Prerequisites
git clone https://github.com/cale312/coding_challenges.gitInstalling the dependencies
Open terminal and navigate to the cloned folder and run commands
npm installRunning the tests
mocha