Page 230 - Web_Application_v2.0_C12_Fb
P. 230
7. The toLowerCase() Method: The toLowerCase() method converts all characters in a string to lowercase.
Example 37: To demonstrate the use of toLowerCase method
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>toLowerCase() Method</TITLE>
</HEAD>
<BODY>
<H2>The toLowerCase() Method</H2>
<P>The toLowerCase() method converts text to lowercase.</P>
<P id="demo1"></P>
<SCRIPT>
var text = "HELLO WORLD";
document.getElementById("demo1").innerHTML = text.toLowerCase();
</SCRIPT>
</BODY>
</HTML>
Output:
8. The concat() Method: The concat() method joins two or more strings together.
Example 38: To demonstrate the use of concat method
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>concat() Method</TITLE>
</HEAD>
<BODY>
<H2>The concat() Method</H2>
<P>The concat() method joins two or more strings.</P>
<P id="demo1"></P>
<SCRIPT>
var text1 = "Hello";
var text2 = "World";
228 Touchpad Web Applications (Ver. 2.0)-XII

