Capitalize the first character
Capitalize the first character of each word of a given string.
Sample Code:
function capitalize(s) {
// Enter your logic here...
}
Examples:
Input: 'hello world'
Output: 'Hello World'
Explanation: Capitalize letter h and w.
Input: '3 cars'
Output: '3 Cars'
Explanation: Capitalize letter c.