Answers for "js function to capitalize"

6

capitalize in javascript

const name = 'flavio'
const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)
Posted by: Guest on August-13-2020
2

javascript name capitalization

function capitalizeName(name) {
  return name.replace(/\b(\w)/g, s => s.toUpperCase());
}
Posted by: Guest on May-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language