Minimum element left from the array after performing given operations | Function to return the minimum possible value of the last element left after performing the given operations ; Driver code
function getMin ( arr , n ) { var minVal = Math . min . apply ( Math , arr ) ; return minVal ; } var arr = [ 5 , 3 , 1 , 6 , 9 ] ; var n = arr . length ; document . write ( getMin ( arr , n ) ) ;