JS Method “toUpperCase()”

Neal Oh
2 min readOct 5, 2020

--

“toUpperCase” Method allows for the strings to convert lowercase strings and changes it into an uppercase string.

I brought this up is because on my first day of learning JS their was a question mentioning to change the string “Hello world” to “Hello World”. I understand what I needed to do. I already know that I need two things, one is the “toUpperCase”, split method, joined method, and I believe the for loop method that will allow us to go through each individual string, numbers, etc. The Split method allows one string split into an array of individual strings and for the join method, it does the same thing but it’s just joining the strings together.

Below I was building this function:

I already know that this doesn't work and I don't remember if this was the code that I wrote, because when I test the code, it gave me a specific capitalize letter but not the way I want. I only shows me a single capitol letter. I have to go to google to see other peoples code and this is what they have showed me.

According to the picture above, the person who wrote the code, also used the split method along with using the for loop as well. However, he didn't use the charAt method. Also he add a joid method wich I forgot to add in my code. I also shouldn't have used the split method because it cause my code to remove certain parts of the letter in my string.

--

--

Neal Oh

Full-Stack Developer & Software Engineering from Flatiron