Letter case correction
Given a string, return the string with its first letter capitalized and lowercase for the rest.
Sample Code:
function letterCase(str) {
// Enter your logic here...
}
Examples:
Input: 'cODe'
Output: 'Code'
Explanation: Only the first letter is uppercase.
Input: 'Javascript'
Output: 'Javascript'
Explanation: Only the first letter is uppercase.