The Tutorial describes you a Array Values code in JavaScript. The Program create a HTML page specifying a button name 'Display Array Values'. An array variable instantiate an array object, that hold the element. On the click event of button, a function display ( ) is invoked that include a variable str. The str hold the values of the array object. The for loop execute and run the script till the value of variable i is less than array length.
The concatenated str and array are assigned to a variable str.
document.getElementById - This return you the element on the basis of respective element Id.
On loading of this code, the browser displays you the value of element in str variable.
JavaScriptArrayValues.html
<html>
|
Output of the program

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: JavaScript Array Values View All Comments
Post your Comment