Thursday, 19 April 2018

How do I make the first letter of a string uppercase in JavaScript?

How do I make the first letter of a string uppercase, but not change the case of any of the other letters?



For example:




  • "this is a test" -> "This is a test"

  • "the Eiffel Tower" -> "The Eiffel Tower"

  • "/index.html" -> "/index.html"

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...