Some functions that I made for my freeCodeCamp certification
Converts the given number into a roman numeral. All roman numerals answers are returned in upper-case.
One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount. A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus A ↔ N, B ↔ O and so on. The function takes a ROT13 encoded string as input and returns a decoded string. All letters will be uppercase.
Return true if the passed string looks like a valid US phone number. The user may fill out the form field any way they choose as long as it has the format of a valid US number. The following are examples of valid formats for US numbers:
- 555-555-5555
- (555)555-5555
- (555) 555-5555
- 555 555 5555
- 5555555555
- 1 555 555 5555
The function validates or rejects the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, the only value allowed for it must be 1.