Average of first n even natural numbers | Return the average of sum of first n even numbers ; driver code
function avg_of_even_num ( n ) { return n + 1 ; } var n = 8 ; document . write ( avg_of_even_num ( n ) ) ;