`let teams = [ {key: cityTeam, value:playerScore[0]},
{key: 'Green Bay', value:computerScore[0]},
{key: "Chicago", value:chicagoScore[0]},
{key: "Los Angeles", value:laScore[0]},
{key: "New York", value:nyScore[0]},
{key: "Miami", value:miamiScore[0]},
{key: "Houston", value:houstonScore[0]},
{key: "Seattle", value:seattleScore[0]},
{key: "Toronto", value:torontoScore[0]},
{key: "Dallas", value:dallasScore[0]},
{key: "Mexico City", value:mexicoCityScore[0]},
{key: "Detroit", value:detroitScore[0]},
`your text`{key: "Ottawa", value:ottawaScore[0]},
{key: "San Francisco", value:sfScore[0]},
{key: "Denver", value:denverScore[0]},
{key: "Toluca", value:tolucaScore[0]} ]`
I spent countless hours attempting to organize this array based on score in descending order. Despite trying various methods such as using a for loop and sorting functions like .sort and .values Sort, I was unable to achieve the desired result. My goal was to display the top six teams ranked by their scores, with an automatic update of rankings whenever there was a change. Unfortunately, after days of troubleshooting, I have yet to find a solution.