CapitalFirstName is used to capitalize the first letter of the string but we go a step further by only capitalizing the first letter of the First name by checking if the name has spaces with the
split() function and then grabbing the first value.
Then finally use the
toUpperCase() function to capitalize the first letter and then slice the letter from the first string to obtain the value for the rest of the name. This is a quick handly function you can use for your next application.
I always had a passion for the field of STEM (Science, Technology, Engineering, and Math) and I knew I wanted to do something to make a difference in the world. I just didn’t know where to start. I was an immigrant in a new country, grew up in a tough environment, and wasn’t sure how… Read More