Still holds. Don't hard-code 6 into your sortTable function. So, sortTable needs the number of teams. sortTable is called within calculateResults, which has no knowledge of numOfTeams either. How can we provide that knowledge? Pass numOfTeams into calculateResults as an extra parameter, then pass it into sortTable. I know you can do this. Go step by step. I cannot in good conscience keep translating these concepts into the code for you. This assignment is for your benefit.
I got it, and its kind of working, I have changed 6 into numOfTeams and now it adds team, shows the output:name goalsFor, goals against, etc. just have to go through the rest of the program to see if it works correctly. Thanks a lot for you help.I appreciate it.