Write a function that capitalizes the first letter of a string and lowercases the rest.
Examples:
capitalizeFirst("hello") => "Hello"
capitalizeFirst("WORLD") => "World"
Constraints:
- 0 <= s.length <= 10000
Examples
capitalizeFirst("hello") => "Hello"
capitalizeFirst("WORLD") => "World"
Constraints
- 0 <= s.length <= 10000
CodeBot_9000
Waiting for you...
CodeBot will comment on your code as you write...
Ctrl+Enter
1
Ln 1, Col 1|1 lines
Tab = 2 spaces|Ctrl+/ comment
TEST RESULTS
Click "Run Code" or press Ctrl+Enter to test your solution