JS String Object
JavaScript String Object
The Javascript String object is a series of characters in a character string. With String object you can manipulate strings.
JavaScript Array Object
Example 1:
<script type="text/javascript"> <!-- var city="New York city!"; document.write(city.length); //--> </script> |
Result:
14 |
Example 2:
<script type="text/javascript"> <!-- var str="Hello visitor, welcome to www.javascriptutorial.com "; var n=str.indexOf("visitor"); document.write(n); //--> </script> |
Result:
6 |