scores = getLatestScores();// Update the scores on the pageupdateScores(scores);}, 60000);// Function to get the latest scores from the serverfunction getLatestScores() {// Make a request to the servervar request = new XMLHttpRequest();request.open("GET", "/latest-scores", true);request.send();// Parse the response from the servervar response = JSON.parse(request.responseText);// Return the latest scoresreturn response.scores;}// Function to update the scores on the pagefunction updateScores(scores) {// Loop through the scoresfor (var i = 0; i < scores.length; i++) {// Get the score for the matchvar score = scores[i];// Find the table row for the matchvar row = document.querySelector("table " + score.matchId);// Update the score in the table rowrow.children[2].innerHTML = score.homeGoals + "-" + score.awayGoals;}}