2
Answers

for loop print only last value

rachana k

rachana k

8y
237
1
for (var i = 0; i < featureSet.features.length; i++) {
for (var f = 0, f1 = featureTracts.length; f < f1; f++) {
rows["Sensor"] = featureTracts[f].attributes.Sensor;
rows["Resolution"] = featureTracts[f].attributes.Resolution;
rows["Dtofparse"] = featureTracts[f].attributes.Dtofparse;//PATH_ROW
// alert(rows);
}
resosat1[i] = rows;
}
 
this is my for loop i am trying iterate all values in loop i am getting but only last value  is only printing
i want all values print in resosat1[i] 
Answers (2)