Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 262 Bytes

File metadata and controls

13 lines (8 loc) · 262 Bytes

capitalize()

Overview

Converts the first character of a string to uppercase.

Code

A screenshot of the titular code snippet

const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);