Title Case
const toTitleCase = (str) => {
return str.replace(/\w\S*/g, ((txt) => {
return txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase()
}))
}
const toTitleCase = (str) => {
return str.replace(/\w\S*/g, ((txt) => {
return txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase()
}))
}