The toLowerCase() String Method
Strings include several methods. The toLowerCase()
method turns your string into all lowercase letters. Here is an example:
var full_name = "Dusty Arlia"; var full_name_in_lowercase = full_name.toLowerCase(); document.write(full_name_in_lowercase);
In this example, the variable full_name
has the value Dusty Arlia
. When we use this string's toLowerCase()
method, the value dusty arlia
is assigned to the new variable full_name_in_lowercase
. The last line:
document.write(full_name_in_lowercase);
prints the value of full_name_in_lowercase
to the screen.
Comments: