var array = [1,2,3,4,5];
for(i = 0; i < array.length; i ++){
}
This is how far I have understood it (not my actual code just an example) and how would I use this for loop to go through the array and then not only remember the highest value but also the position that it is in. What I want to do specifically in my code is create a point system that increases the values of different position numbers in the array, then sorts through them to find the highest value and depending on which position/variable in the array has the highest value it will do something different. apologies for the grammar.