jagku
asked on
Traversing arrays in javascript
Hello Experts,
I have the following code:
How can I traverse the array so the results is:
5
10
17
Thanks!
I have the following code:
var myarr = new Array();
myarr[10] = 10;
myarr[5] = 50;
myarr[17] = 70;
for(var i in myarr)
{
document.write("<BR>"+i);
}
How can I traverse the array so the results is:
5
10
17
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As usual, thank you!!!