Answers for "javascript remove underscore and capitalize"

0

javascript remove underscore and capitalize

function humanize(str) {
  var i, frags = str.split('_');
  for (i=0; i<frags.length; i++) {
    frags[i] = frags[i].charAt(0).toUpperCase() + frags[i].slice(1);
  }
  return frags.join(' ');
}


humanize('humpdey_dumpdey');
// > Humpdey Dumpdey
Posted by: Guest on September-25-2020

Code answers related to "javascript remove underscore and capitalize"

Code answers related to "Javascript"

Browse Popular Code Answers by Language