rachana k

rachana k

  • NA
  • 17
  • 2.3k

for loop print only last value

Oct 5 2016 3:15 AM
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)