text: Program to find Nth term of the series 3 , 6 , 18 , 24 , ... | function to calculate Nth term of series ; By using above formula ; get the value of N ; Calculate and print the Nth term
code: function nthTerm ( N ) { return parseInt ( N * ( parseInt ( N / 2 ) + ( ( N % 2 ) * 2 ) + N ) ) ; } let N = 5 ; document . write ( " " + N + " " + nthTerm ( N ) ) ;