![]() ![]() ![]() For instance, if we have an array, the first position is 0, not 1.Īlso, we can access each letter from a String in the same way that we access an element from an array. Here is an example: const publication = "freeCodeCamp" After you learn how to do this, we'll proceed to the next level – doing it on every word from a sentence. Capitalize the first letter of a wordįirst of all, let's start with capitalizing the first letter of a single word. Therefore, in this article you are going to see multiple ways of solving the same problem. The beautiful thing about programming is that there is no one universal solution to solve a problem. After that, you are going to capitalize the first letter of all words from a sentence. In this article, you are going to learn how to capitalize the first letter of any word in JavaScript. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |