belmer
3/14/2018 - 2:33 PM

Chase

Chase

function sort(arr) {
	return arr.slice().sort(function(a,b){return a.ranking-b.ranking})
}
function average(arr) {
	let sum = 0
  arr.forEach((item)=> {
		sum = sum + item.ranking 
  })
  return sum/arr.length
}