9 lines
294 B
JavaScript
9 lines
294 B
JavaScript
function unCapitalize_Words(str)
|
|
{
|
|
return str.replace(/\w\S*/g,
|
|
function(txt)
|
|
{
|
|
return txt.charAt(0).toLowerCase() + txt.substr(1).toLowerCase();});
|
|
}
|
|
|
|
console.log(unCapitalize_Words('Js String Exercises'));
|