title: Cannot display Array
body: <pre><code>  var processResult = function(items)
  {
  
      return  items;
  };
      function queryDB(callback) {
  
              var sqlTxt = "SELECT * FROM DEMO";
              db.transaction(
                      function(tx) {
                          tx.executeSql(sqlTxt, [],
                                  function(tx, results) {
                                      var item_Codes = [];
                                      for (var i = 0; i &lt; results.rows.length; i++) {
  
                                          item_Codes.push({item_code: results.rows.item(i).itemCode});
                                      }
                                      callback(item_Codes);
                                  })
                                  , errorCB;
                      });
              return false;
          }
  </code></pre>
  
  <p><strong>Main.js</strong></p>
  
  <pre><code>  queryDB(processResult, function(arr) {
              $.each(arr, function(i, elem) {
  
          });
      });
  </code></pre>
  
  <p>In above Code item_Codes is  array.Here i need to print the Array after  the data is loaded.But when i try to print the array it displays null. How Can i print the Array after the data is loaded to the Array.</p>