You can think about it as simplifying of the first argument "cd" command (a standart bash command). Simplifying means making shorter.
For instance if I do
cd a/../b it works the same as
cd b. Which means "b" is simplifying of "a/../b". It is much easier to explain everything using examples.
Input: String. Unix path.
Output: String. Unix path.
// last slash is not important simplifyPath('/a/')...