Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 463 Bytes

capitalize.md

File metadata and controls

18 lines (12 loc) · 463 Bytes

capitalize (source code)

  • Curried: false
  • Failsafe status: alternative available

The capitalize function converts the first character of a string to uppercase.

Arguments:

  • string: The string to be converted.

Usage:

capitalize("oliver"); // "Oliver"
capitalize("OLIVER"); // "OLIVER"
capitalize("oLIVER"); // "OLIVER"