theEnd: first or last character
Given a string, return a string made of its first character if front is true, or its last character if front is false. The string will be at least length 1. Step through theEnd: the last character is always at index str.length()-1, because indexes start at 0.