JavaScript 2025 · Strings

Capitalize a word

Uppercase the first letter and keep the rest.

const title = word[0].toUpperCase() + word.slice(1);

Official JavaScript 2025 documentation

More strings commands

All strings commands · JavaScript 2025 cheatsheet

Was this page helpful?