Create a string object and then calls it substring method in JavaScript
Description
The following code shows how to create a string object and then calls it substring method.
Example
<!-- w ww.j av a 2s. c om-->
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var s1 = "some text";
var s2 = s1.substring(2);
</script>
</head>
<body>
</body>
</html>
The code above generates the following result.
Javascript Tutorial String Format
Create a StringBuffer class based on array ...
Create a b element from string object in Ja...
Create a big element from string object in ...
Create a font element from string object an...
Create a font element from string object an...
Create a small element from string object i...
Create a strike element from string object ...
Create a string from character code in Java...
Create a string with the String constructor...
Create a sub element from string object in ...
Create a sup element from string object in ...
Create a tt element from string object in J...
Create an anchor link element from string o...
Create an anchor link from string object in...
Create an i element from string object in J...
Create a StringBuffer class based on array ...
Create a b element from string object in Ja...
Create a big element from string object in ...
Create a font element from string object an...
Create a font element from string object an...
Create a small element from string object i...
Create a strike element from string object ...
Create a string from character code in Java...
Create a string object and then calls it su...
Create a string type variable with either d...Create a string with the String constructor...
Create a sub element from string object in ...
Create a sup element from string object in ...
Create a tt element from string object in J...
Create an anchor link element from string o...
Create an anchor link from string object in...
Create an i element from string object in J...