Adscend

Click Here



Click Here

Tuesday

String Function substring

String Function substring()

Object: String
Method or Function: substring(int, int)
Syntax: String.substring(int, int)

substring function takes two integer arguments. The first argument is the start index and the second argument is the end index.


Example

<script language=javascript>
var x = "Hello Everybody ";
document.write(x.substring(0,7));
</script>


Note:Here string is counted from zero.




No comments:

Post a Comment