How To Capitalize First Letter In JavaScript | Make First Letter (Character) Uppercase

preview_player
Показать описание
(We're free online community, meet other makers!)

js capitalize first letter
capitalize first letter in javascript
js make first letter uppercase
js change first to uppercase
Рекомендации по теме
Комментарии
Автор

Finally a simple explanation! learnt in 2 mins what I couldn't in 2 weeks. thanks man

andreacostaphotography
Автор

I leave this example made with the method that the author of the video says and using a for loop to do it with all the words of a sentence! Thank you very much for the video!:

function titleCase(str) {
var array = [];

str = str.toLowerCase();
str = str.split(' ');

for(var i = 0;i < str.length;i++){

var words =

array.push(words);





}
var result = array.join(" ");


return result;
}

console.log(titleCase("I'm a little tea pot"));

cuentosconmensaje
Автор

what if we give 2 words into it... example "redux rocket" - expected "Redux Rocket"

x-sss-x
Автор

i cant stand how youtube puts image links of the next video they want to show you right in the screen. I cant even see the end of your code. god they've becoming annoying

jpm
Автор

cant see the end code because you blocked it with your other vids

Likeatoss
Автор

Hi im in fourth grade, my anbition is to become a developer so I am practicing. I found out im actyally kunda good

shaimashameem
Автор

Help me please how to make the word into initial letter only like for example "Hello" into "H" only please help😭

queencessbentor