Driver Code
let arr = [ 1 , 2 , 3 , 4 , 5 ] ; document . write ( findMean ( arr , 0 , 2 ) + " " ) ; document . write ( findMean ( arr , 1 , 3 ) + " " ) ; document . write ( findMean ( arr , 0 , 4 ) + " " ) ;