How to Capitalize the First Letter in a String in JavaScript

1 · Josh Sherman · Feb. 14, 2016, midnight
I’m still kind of spoiled by the built in functions in PHP (as well as Ruby and Python for this particular task). Something like capitalizing the first letter of a string is trivial thanks to ucfirst. But in JavaScript, assuming you’re not using php.js, the process is a bit more......