I've been reviewing the answers on How to capitalize the first letter of each word in a string using JavaScript? but yet can't get any to work.
I'm trying to capitalize the first letter of each word in a string. But with an example such as I'm an example (for stack overflow).
the word for
is not capitalized.
Is there a way to do this?