Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: How to check if array includes a value from another array in JavaScript 
Javascript :: jquery get meta value 
Javascript :: javascript difference between two dates in days 
Javascript :: get url without parameters javascript 
Javascript :: javascript capitalize array 
Javascript :: check value exist in array javascript 
Javascript :: javascript check typeof array 
Javascript :: pdf with puppeteer 
Javascript :: js get current timezone offset 
Javascript :: check if an array is empty javascript 
Javascript :: window onscroll position fixed position in jquery 
Javascript :: part of sting js 
Javascript :: js populate an empty array of zeros 
Javascript :: emit resize event in angular 
Javascript :: cube root of a number in js 
Javascript :: next js getserversideprops 
Javascript :: today date javascript 
Javascript :: open modal in jqwuery 
Javascript :: JavaScript HTML DOM - Changing CSS 
Javascript :: hot reload problem react 17 
Javascript :: how to remove identical string in javascript 
Javascript :: angular access service in console 
Javascript :: how to call web api with the useeffect hook in react 
Javascript :: While loop factorial function in javascript 
Javascript :: javascript check if a number is even or odd 
Javascript :: predicate function javascript 
Javascript :: discord.js remove reaction 
Javascript :: tailwind config 
Javascript :: how to remove middle characters in string javascript 
Javascript :: js setinterval 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =