text: Prints average of a stream of numbers
code: function streamAvg ( arr , n ) { let avg = 0 ; for ( let i = 0 ; i < n ; i ++ ) { avg = getAvg ( avg , arr [ i ] , i ) ; document . write ( " " + ( i + 1 ) + " " + avg . toFixed ( 6 ) + " " ) ; } return ; }