function scoreboard_sort(list){

  // Sort array by the points
  let output = list.sort(function(a,b){
    return b.points - a.points;  // Sorting in descending order
  });

  return output;
}
// Function for sorting client scores to scoreboard in descending order
Function for sorting client scores to scoreboard in descending order
Function for sorting client scores to scoreboard in descending order
function scoreboard_sort(list){
  let output = list.sort(function(a,b){
    return b.points - a.points;  
  });
  return output;
}
function scoreboard_sort ( list ) { let output = list . sort ( function ( a , b ) { return b . points - a . points ; } ) ; return output ; }
Function for sorting client scores to scoreboard in descending order
Function for sorting client scores to scoreboard in descending order
// Sort array by the points // Sorting in descending order