Symbol#capitalize() : capitalize() is a Symbol class method which returns the capitalized form of symbol based on the position of next capital form.
Syntax: Symbol.capitalize()
Parameter: Symbol values
Return: the capitalized form of symbol based on the position of next capital form.
Example #1 :
Output :
Symbol a : aBcDeF
Symbol b : äöü
Symbol c : ABCDEF
Symbol a capitalize form : Abcdef
Symbol b capitalize form : äöü
Symbol c capitalize form : Abcdef
Example #2 :
Output :
Symbol a : geeks
Symbol b : åöó
Symbol c : GEEKS
Symbol a capitalize form : Geeks
Symbol b capitalize form : åöó
Symbol c capitalize form : Geeks