In this Tutorial we want to describe you a code that make you JavaScript array iteration easy to understand.
JavaScript array iteration
In this Tutorial we want to describe you a code that make you JavaScript array iteration easy to understand. For this we are using JavaScript language as scripting language. We use a function new array ( ),inside this function we instantiate an array object that sized for 4 elements. The array variable hold the value of array element indicated array index[0]-[3]. The function iteration define a variable space and also include for loop that run and execute the script till the variable i is less than the array length. Inside the script, var x store and assign the value of new array ( ) function. Finally the document. write print the value of iteration function ,that accept the variable x as a argument.
JavaScript_Array_iteration.html
<HTML>
|
Output of the program