The syntax of for loop is given on the right:
|
|
The script checks whether the entered ID is numeric or not.
It uses a for loop to loop through the ID byte by byte.
The property length of the object String contains the length of the string.
For example,
var s = "Hello!"; document.write( s.length );will print a value of 6. |
|