As Richard Deeming suggested your code needs a bit of work. Here's my version of how it should be done.
mySchool = [{Name: "Peter", Surname: "B", school: "primary", score: 54}];
mySchool.push({Name: "Adam", Surname: "B", school: "primary", score: 54});
mySchool.push({Name: "Mike", Surname: "Z", school: "primary", score: 42});
mySchool.push({Name: "Mia", Surname: "M", school: "primary", score: 73});
mySchool.push({Name: "Jason", Surname: "T", school: "primary", score: 21});
mySchool.push({Name: "Jolyn", Surname: "P", school: "primary", score: 68});
myRow = Number(prompt("Enter # "));
mySchool.sort((a, b) => a.score - b.score);
console.table(mySchool); table is sorted in ascending order
mySchool.pop();
P.S. I hope this helps.