Extract the first string element
Return the first letter of the given string.
Sample Code:
function firstLetter(str) {
// Enter your logic here...
}
Examples:
Input: 'Codetisan'
Output: 'C'
Explanation: 'C' element has an index value of 0.
Input: ' Javascript'
Output: ' '
Explanation: ' ' element has an index value of 0.