Does anyone know how to get the variable names in the array? For example, [a, b, c] wants to get the values of a, b, c and a, b, c respectively by traversing.
温故而知新,可以为师矣。 博客:www.ouyangke.com
> arr=[] > arr['a']=1 > arr['b']=2 > arr['c']=3 > for(k in arr)console.log(k,arr[k]) a 1 b 2 c 3 > arr [ a: 1, b: 2, c: 3 ]
No.
for in ?
for in
No.
for in
?