> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/text-strings/.capwords-and-.capfirst.md).

# .capWords() and .capFirst()

`.capWords()` capitalizes each word.

`.capFirst()` capitalizes only the first character.

***

#### Syntax

```js
string.capWords();
string.capFirst();
```

***

#### Output

```js
string
```

***

#### Example

```js
'hello world'.capWords(); // Hello World
'jscula'.capFirst();     // Jscula
```

***

#### Key Takeaway

> Use these for simple title and label formatting.
