Program to print triangular number series till n | Function to find triangular number ; Driven Function
function triangular_series ( n ) { for ( let i = 1 ; i <= n ; i ++ ) document . write ( " " + i * ( i + 1 ) / 2 ) ; } let n = 5 ; triangular_series ( n ) ;