String Function length()
Method or Function: length
Syntax: String.length()
Length method calculates the total no of characters of string and returns the value to a variable.
Example
<script type="text/javascript">
var x = "Hello everybody";
document.write(x.length);
</script>
var x = "Hello everybody";
document.write(x.length);
</script>
No comments:
Post a Comment