string to title case javascript
function titleCase(sentence) {
let sentence = string.toLowerCase().split(" ");
for (let i = 0; i < sentence.length; i++) {
sentence[i] = sentence[i][0].toUpperCase() + sentence[i].slice(1);
}
return sentence.join(" ");
}
Also in JavaScript:
- jQuery Event Methods
- react native spinner
- ejs if else
- discord js presence update
- colors in node js console
- in angular how to get router url without query params
- javascript code for year in html
- find smallest length string in an array js
- django jquery
- js date now format
- ternary operator
- jquery growl cdn
- Queue Events don't trigger with BullMQ using Heroku Redis
- jquery ready function
- no styles are appearing in angular calendar
- remove in javascript
- minvalue validation react admin
- random number in js
- electron file association
- como percorrer um objeto js
- change version webpack-dev-middleware
- avoid compressing imagepicker react native
- how to check leap year in javascript
- How to tell if an attribute exists on an object