Skip to content

Instantly share code, notes, and snippets.

@rimzzlabs
Last active June 10, 2022 02:41
Show Gist options
  • Save rimzzlabs/9e1d022e2ddaf75a3aae4a78544ea44a to your computer and use it in GitHub Desktop.
Save rimzzlabs/9e1d022e2ddaf75a3aae4a78544ea44a to your computer and use it in GitHub Desktop.
A JavaScript Function that will capitalize the first letter of each words
export const capsLetter = (str) => str.split(' ').map(l => l.slice(0, 1).toUpperCase() + l.slice(1)).join(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment