check is this character is capitalized 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());
}