capitalize() converts the first letter in each word into an uppercase letter. Subsequent letters in each word are changed into lowercase letters.
capitalize()
Parameters:
Return value:
Example:
Both @@phrase1 and @@phrase2 will be set to "Hello World".
@@phrase1
@@phrase2
"Hello World"
lowerCase() returns a string with all the letters converted into lower case letters.
lowerCase()
string textToConvert
Both @@phrase1 and @@phrase2 will be set to "hello world".
"hello world"
upperCase() returns a string converted into all UPPERCASE letters.
upperCase()
Return value:A string converted into UPPERCASE letters.
Both @@phrase1 and @@phrase2 will be set to "HELLO WORLD".
"HELLO WORLD"