Capitalize the Names javascript code example
Example: javascript name capitalization
function capitalizeName(name) {
return name.replace(/\b(\w)/g, s => s.toUpperCase());
}
function capitalizeName(name) {
return name.replace(/\b(\w)/g, s => s.toUpperCase());
}