Structure to store the minimum element and its position
class data { constructor ( element , position ) { this . element = element ; this . position = position ; } } ; function findMinElement ( arr , n ) { let result = new data ( ) ;