Motivation: Basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.
The testing process: Processing or building strings.
Motivation: String is one of the most commonly used data structures, so every programmer should be skilled at string manipulation.
Write a function that converts user entered date formatted as M/D/YYYY to a format required by an API (YYYYMMDD). The parameter "userDate" and the return value are strings.
For example, it should convert user entered date "12/31/2014" to "20141231" suitable for the API.
- Example case: Wrong answer
- Two-digit month and day: Wrong answer
- One-digit day: Wrong answer
- One-digit month: Wrong answer