What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-20 22:17:02
capitalize first letter of each word javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
TypeScript 2021-09-20 18:54:02
javascript capitalize all words
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-09-19 12:31:03
how to capitalize string in javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-09-18 23:57:02
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 Add solution -
Javascript 2021-09-16 16:52:02
generate random color jquery
$("#btn").click(() => { var colorCode = "1234567890abcdef"; var color = ""; for (var i = 0; i < 6; i++) { color += colorCode.charAt(Math.floor(Math.random() * colorCode.length)); } $("#hex").html... Add solution
Best helpers
Ranking is empty