var mountains = new Array (
  1819,
  2003,
  876,
  2840,
  1723,
  1673,
  3776,
  2848,
  1592,
  922
)

function threeLargestEntries(entries){
        entries.sort(function(a,b){
        if(a < b){ 
        	return 1; 
        } 
        else if(a == b) { 
        	return 0; 
        } 
        else { 
        	return -1; 
       }
    });
    
    return entries.slice(0, 3);
}

console.log(threeLargestEntries(mountains));