Array inside an object
<pre><code>var Obj = {

    StateValues: ['AL','AK','AL','AK','AZ','AR','CA','CO','CT','DE','FL','GA','HI','ID','IL','IN','IA',
    'KS','KY','LA','ME','MD','MA','MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC','ND',
    'OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VT','VA','WA','WV','WI','WY'],

    getItemRow: function(itemValue) {
     var myPosition=-1
       for (i=0;i&lt;this.StateValues.length;i++) {
          if(this.StateValues[i]==itemValue) {
            myPosition = i;
             break;
         }
      }
      return myPosition;
    }
}
</code></pre>

<p>What's wrong with this piece of code. Am i declaring the correct way. The issue started after adding the array in my Object.</p>
