javascript capitalise a string

Solutions on MaxInterview for javascript capitalise a string by the best coders in the world

showing results for - "javascript capitalise a string"
Sophie
19 Apr 2020
1const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1)
2
3capitalize("follow for more")
4// Result: Follow for more
5