title: I have an array of objects in javascript that wont sort by date
body: <p>I'm little new to programming Im having trouble understanding why my sort function wont sort by date ?</p>
  
  <pre><code>var customer_orders = [
                  { 
                      order_number:  1, 
                      customer: 'Jess Learmonth',    
                      total_cost: 200,    
                      processed_date: '23/01/2016' 
                  },
  
                  { 
                      order_number: 14, 
                      customer: 'Adam Bowden',       
                      total_cost: 100,    
                      processed_date: '22/01/2015' 
                  }
              ];
  
  
  customer_orders.sort(function(a, b) {
      var dateA = new Date(a.processed_date), dateB = new Date(b.processed_date);
      return dateA - dateB;
  });
  </code></pre>