![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, let say i have the following array : var ary = [ [ 'Directory', 'type', 'href', 'tip', ['file', 'type', 'href', 'filetip' ], ['file2', 'type2', 'href', 'filetip' ], ], [ 'Dir2', 'href2', 'tipdir2' ] ] I want to send to a function part of this array by reference. Currently i tried to send whole array to function i.e. myfunc(ary) Then I want to walk the array like this : function myfunc(a) { for (el in a) { alert(el[0]) } } |
|
I expect to get in 'el' an array-reference not an index, so that I can say el[0] instead ary[el][0]. |
![]() |
| Thread Tools | |
| Display Modes | |
| |