119
rated 0 times
[
125]
[
6]
/ answers: 1 / hits: 61569
/ 13 Years ago, sun, july 3, 2011, 12:00:00
var myArr = [{a:1, b:2}, {c:3, d:4}];
for (var item in myArr) {
console.log(item);
}
Item returns the key (ex: 0, 1) instead of the object itself. Why?
More From » javascript