string function in java script
a string is a collection of characters in java script
it is an object.we can declare the string in two ways
<script>
str= newstring("welcome to java script");
str1="welcome to karana";
alert(str);
alert(str1);
</script>
length
rerun the total number of character on the string
indexof()
return the index number of input charactor of a string
<string>
str=new string('well come to java script");
alert(str.indexof('e"));
</script>
char At
this function return the character of input index number from a string
<script>
str=new string(well come to karana")
alert (str.charat(1));
</script>
charcode at
this function return the ASCII values input index numbers
a string is a collection of characters in java script
it is an object.we can declare the string in two ways
<script>
str= newstring("welcome to java script");
str1="welcome to karana";
alert(str);
alert(str1);
</script>
length
rerun the total number of character on the string
indexof()
return the index number of input charactor of a string
<string>
str=new string('well come to java script");
alert(str.indexof('e"));
</script>
char At
this function return the character of input index number from a string
<script>
str=new string(well come to karana")
alert (str.charat(1));
</script>
charcode at
this function return the ASCII values input index numbers