Summary
We can capitalize a word in JavaScript by utilizing the toLowerCase() method to make the entire string lower-cased and then uppercase the first letter.
1
Alternatively, we can use the toUpperCase() method, which returns the same string but as an uppercase.
2
To capitalize the first letter of a word with JS, we need to understand three string methods: charAt, slice, and toUpperCase.
3
According to