JS String Methods

 
<!DOCTYPE html>
<html>
<head>
    <title>JavaScript</title>
    <script>
		var str = "     JavaScript is a Great is Language";
		var a = str.length;  /* Length Method */
		var b = str.toLowerCase(); /* LowerCase Method */
		var c = str.toUpperCase(); /* UpperCase Method */
		var d = str.includes("ipt"); /* Include Method */
		var e = str.startsWith("Java"); /* StartWith Method */
		var f = str.endsWith("age"); /* EndWith Method */
		var g = str.search("is"); /* Search Method */
		var h = str.match(/is/g); /* Match Method */
		var i = str.indexOf("is"); /* IndexOf Method */
		var j = str.lastIndexOf("is"); /* LastIndexOf Method */
		var k = str.replace("JavaScript","PHP"); /* Replace Method */
		var l = str.trim(); /* Trim Method */

		document.write(a + "<br>");
		document.write(b + "<br>");
		document.write(c + "<br>");
		document.write(d + "<br>");
		document.write(e + "<br>");
		document.write(f + "<br>");
		document.write(g + "<br>");
		document.write(h + "<br>");
		document.write(i + "<br>");
		document.write(j + "<br>");
		document.write(k + "<br>");
		alert(l);
    </script>
</head>
<body>
</body>
</html>