@Syed_AlamM
It looks like indexOF saves the index of the last occurrence of whatever number you are looking for in an array. In this case it is '45'. So indexOF will always be set to the index of the last occurrence of '45'. So if the array is [3,45,67,74,45] indexOF will be 4 since the last 45 element is at index 4.
Hope this makes sense.