PokéRogue
    Preparing search index...

    Function capitalizeFirstLetterOnly

    • Capitalize the first letter of a string, and make the rest lowercase.

      Parameters

      • str: string

        The string to transform

      Returns string

      The original string with all letters lowercase except the first which is capitalized

      console.log(capitalizeFirstLetterOnly("WATER")); // prints "Water"