patricknguyen178

Can't understand the code please explain for me ^^

Discussion created by patricknguyen178 on Dec 2, 2013
Latest reply on Dec 2, 2013 by JGravois-esristaff
Hi everybody !

I'm practicing about Query and Select in Arcgis and now doing this example

https://developers.arcgis.com/en/javascript/jssamples/query_nomap.html

In this code, I understand what the code is doing but there is a function that confusing me. Please help me to understand this.

Here's the function

function showResults(results) {
          var s = "";
          for (var i=0, il=results.features.length; i<il; i++) // what is results.features.length ?
{
            var featureAttributes = results.features[i].attributes; // and what is  results.features[i].attributes
            for (att in featureAttributes) { // what is att mean for ? 
              s = s + "<b>" + att + ":</b>  " + featureAttributes[att] + "<br>";
            }
            s = s + "<br>";
          }
          dom.byId("info").innerHTML = s;
        }


And by the way can anyone suggest me what software is good for the ArcGis API for JavaScript ? I'm now using visual studio 2012 but always having the IntelliSense problem. Please help me !!!!!! ^^

Best Regards,

Phuong Nguyen

Outcomes