Program to find the Nth term of series | calculate Nth term of series ; Get the value of N ; Find the Nth term and print it
function nthTerm ( N ) { return ( ( 3 * N * N ) - ( 6 * N ) + 2 ) ; } let N = 3 ; document . write ( nthTerm ( N ) ) ;