<html>
<head>
<title>charAt()</title>
</head>
<body>
<script type="text/javascript">
var str = new String( "Java Script" );
document.writeln("charAt(0) is:" + str.charAt(0));
document.writeln("<br />charAt(1) is:" + str.charAt(1));
document.writeln("<br />charAt(2) is:" + str.charAt(2));
document.writeln("<br />charAt(3) is:" + str.charAt(3));
</script>
</body>
</html>
charAt(0) is:J
charAt(1) is:a
charAt(2) is:v
charAt(3) is:a
<html>
<head>
<title>charCodeAt()</title>
</head>
<body>
<script type="text/javascript">
var str = new String( "Java Script" );
document.writeln("charAt(0) is:" + str.charCodeAt(0));
document.writeln("<br />charAt(1) is:" + str.charCodeAt(1));
document.writeln("<br />charAt(2) is:" + str.charCodeAt(2));
document.writeln("<br />charAt(3) is:" + str.charCodeAt(3));
</script>
</body>
</html>
charAt(0) is:74
charAt(1) is:97
charAt(2) is:118
charAt(3) is:97
<html>
<head>
<title>concat()</title>
</head>
<body>
<script type="text/javascript">
var str1 = new String( "www.freetimelearnlearning.com , " );
var str2 = new String( "www.freetimelearnlearn.com" );
var str3 = str1.concat( str2 );
document.write("String Concatenating : " + str3);
</script>
</body>
</html>
String Concatenating : www.freetimelearnlearning.com , www.freetimelearnlearn.com
<html>
<head>
<title>String indexOf() Method</title>
</head>
<body>
<script type="text/javascript">
var str1="My java script tutorial";
var number=str1.indexOf("script");
document.write(number);
</script>
</body>
</html>
8
<html>
<head>
<title>String lastindexOf() Method</title>
</head>
<body>
<script type="text/javascript">
var str1="My java script tutorial";
var number=str1.lastIndexOf("java");
document.write(number);
</script>
</body>
</html>
3
<html>
<head>
<title>String match() Method</title>
</head>
<body>
<script type="text/javascript">
var str_1 = "Javascript 1.4.7";
var ma_1 = /(Javascript \d+(\.\d)*)/i;
var ans = str_1.match( ma_1 );
document.write(ans );
</script>
</body>
</html>
Javascript 1.4.7,Javascript 1.4.7,.7
<html>
<head>
<title>String replace() Method</title>
</head>
<body>
<script type="text/javascript">
var repl = /(\w+)\s(\w+)/;
var str1 = "Reddy Ramana";
var newstring = str1.replace(repl, "$2, $1");
document.write(newstring);
</script>
</body>
</html>
Ramana, Reddy
<html>
<head>
<title>String search() Method</title>
</head>
<body>
<script type="text/javascript">
var repl = /Free/gi;
var str_1 = "Search your Website Free";
if ( str_1.search(repl) == -1 ){
document.write("Free Time Learning" );
}
else
{
document.write("Free Websites" );
}
</script>
</body>
</html>
Free Websites
<html>
<head>
<title>String slice() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "free time learning.";
var sliced = str.slice(6, -4);
document.write( sliced );
</script>
</body>
</html>
ime learn
<html>
<head>
<title>String split() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "Free Time Learning my javascript tutorial";
var splitted = str.split(" ", 3);
document.write( splitted );
</script>
</body>
</html>
Free,Time,Learning
<html>
<head>
<title>String substr() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "free time learning, and learn javascript";
document.write("(1,3): " + str.substr(1,3));
document.write("<br />(-2,5): " + str.substr(-2,5));
document.write("<br />(1): " + str.substr(1));
document.write("<br />(-15, 4): " + str.substr(-15,4));
document.write("<br />(20, 6): " + str.substr(20,6));
</script>
</body>
</html>
(1,3): ree
(-2,5): pt
(1): ree time learning, and learn javascript
(-15, 4): earn
(20, 6): and le
<html>
<head>
<title>String substring() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "Free Time Learning, Learn JavaScript";
document.write("(1,5): " + str.substring(1,5));
document.write("<br />(0,15): " + str.substring(0, 15));
document.write("<br />(10): " + str.substring(10));
</script>
</body>
</html>
(1,5): ree
(0,15): Free Time Learn
(10): Learning, Learn JavaScript
<html>
<head>
<title>String toString() Method</title>
</head>
<body>
<script type="text/javascript">
var string = "Free Time Learning, Learn JavaScript";
document.write(string.toString( ));
</script>
</body>
</html>
Free Time Learning, Learn JavaScript
<html>
<head>
<title>String toLowerCase() Method</title>
</head>
<body>
<script type="text/javascript">
var string = "Free Time Learnin, Learn JavaScript.";
document.write(string.toLowerCase( ));
</script>
</body>
</html>
free time learnin, learn javascript.
<html>
<head>
<title>String toUpperCase() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "Free Time Learning, Learn Java Script.";
document.write(str.toUpperCase( ));
</script>
</body>
</html>
FREE TIME LEARNING, LEARN JAVA SCRIPT.
<html>
<head>
<title>String trim() Method</title>
</head>
<body>
<script type="text/javascript">
var str1=" Learn JavaScript ";
var str2=str1.trim();
document.write(str2);
</script>
</body>
</html>
Learn JavaScript