titlecase
Anonymous
javascript
07/11/2022 4:45 AM
128 B
20
Indexable
function titleCase(str) {
return str.toLowerCase().replace(/\b\w/g, s => s.toUpperCase());
}Editor is loading...
function titleCase(str) {
return str.toLowerCase().replace(/\b\w/g, s => s.toUpperCase());
}