title: Why is my key not getting pushed inside the array
body: <pre><code>var arr = [{
     key: "key1", value: "z"
  }, {
     key: "key2", value: "u"
  }, {
     ...
  }];
  
  var sorted = arr.sort(function (a, b) {
      return a.key === b.key ? 0
          : a.key &lt; b.key ? -1 : 1;
  });
  
  sorted.unshift({key:"Unknown", value:"0"});
  
  var StateArr = [];
   for(i=0;i&lt;sorted.length;i++){
       StateArr.push(sorted[i].key);
  }
  
  alert("ARR" +StateArr);
  </code></pre>
  
  <p>Now when i alert my sorted, i don't get any response. Why is my key not getting pushed inside the array. </p>