Let's say that I have an object called "animal" and it has an attribute called "type".
By default animal.type returns string values such as "dog" or "CAT". I would like to turn those strings into something like "Dog" or "Cat" with only the first letter being uppercase. There are only alphabetic characters in the string so there will not be spaces, numbers or special characters.
What are some efficient ways to do that in JavaScript?