Conway's Game of Life implementation
User can:
- create recipes that have names and ingredients;
- see an index view where the names of all the recipes are visible;
- click into any of those recipes to view it;
- edit these recipes;
- delete these recipes. All new recipes User adds are saved in user's browser's local storage. If user refreshes the page, these recipes will still be there.
A table of the Free Code Camp campers who've earned the most brownie points in the past 30 days. User can see how many brownie points they've earned in the past 30 days, and how many they've earned total. User can toggle between sorting the list by how many bronwie points they've earned in the past 30 days and by how many brownie points they've earned total.
Converts two dates into a more friendly date range that could be presented to a user. It does not show any redundant information in the date range. If the year and month are the same then only the day range should be displayed. If the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted. Input date format is YYYY-MM-DD
A script by V.
Returns the number of total permutations of the provided string that don't have repeated consecutive letters. In this particular case number of permutations for, for example, 3-character string equals !3 = 3 * 2 * 1 = 6. For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.
A script by V.
Function compares and updates inventory stored in a 2d array against a second 2d array of a fresh delivery. It updates current inventory item quantity, and if an item cannot be found, adds the new item and quantity into the inventory array in alphabetical order.
A script by V.
A cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument. cid is a 2d array listing available currency. Function returns the string "Insufficient Funds" if cash-in-drawer is less than the change due, the string "Closed" if cash-in-drawer is equal to the change due. Otherwise, it returns change in coin and bills, sorted in highest to lowest order.
A script by V.
Function takes two or more arrays and returns an array of the symmetric difference of the provided arrays - (((A∆B)∆C)∆...)∆Nn.
The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.
(A∆B)∆C - comprehensive explanation
A script by V.
Function returns true if the passed string is a valid US phone number, otherwise false. If the country code is provided, function checks if the country code is 1. The following are all valid formats for US numbers: 555-555-5555 (555)555-5555 (555) 555-5555 555 555 5555 5555555555