So this number we will set as upper limit of our number of rotation or looping.
Displaying elements of an Array
You can check our tutorial on creating array to create an array and now we will try to display each element of the array. Here is the code.
var scripts = new Array();
scripts = "PHP";
scripts = "ASP";
scripts = "HTML";
document.write(scripts[i] + "<br >");
The for loop in the above code loops through the elements of the array and display one by one vertically by adding one line break at the end of each element. The upper limit of the for loop is set to script.length value which is in this case equal to 4
scripts is the first element of the array and scripts is the last or 4th element of the array.