|
|
winner
to equal the first value in the array, before the loop starts. At the moment line 43 is always true
and it shows the winner as being the last value in the array. Would it be better to return i
, then you could use that to look up the candidates name?