Using an incrementor, print out the number of teams in the array.
I'm having issues I originally had an array that printed out the teams now using the for loop I'm also trying to get it to increment the numbers of teams fun main(args: Array<String>) { var team1 = team(); var teams = mutableListOf<team>(); team1.teamNumber = 1; team1.name = "Browns "; teams.add(team1); var team2=team(); team2.teamNumber = 2; team2.name = " Rams"; teams.add(team2); var team3=team(); team3.teamNumber = 3; team3.name = " Eagles"; teams.add(team3); var team4=team(); team4.teamNumber = 4; team4.name = " Steelers"; teams.add(team4); var team5=team(); team5.teamNumber = 5; team5.name = " Redskins"; teams.add(team5); var team6=team(); team6.teamNumber = 6; team6.name = "Lions"; teams.add(team6); var team7=team(); team7.teamNumber = 7; team7.name = "Packers"; teams.add(team7); var team8=team(); team8.teamNumber = 8; team8.name = "Bears"; teams.add(team8); var team9=team(); team9.teamNumber = 9; team9.name = "Cardinals"; teams.add(team9); var team10=team(); team10.teamNumber = 10; team10.name = "Giants"; teams.add(team10); var counter = 0 for (numberteam in teams) { println (numberteam.name) println("") counter++ } //println("total teams:" + counter.toString()) //println(numberteam.count()) } class team();{ var teamNumber = 0; var name = ""; }