Find the sequence number of a triangular number | javascript code to print sequence number of a triangular number ; If N is not tringular number
let N = 21 ; let A = Math . sqrt ( 2 * N + 0.25 ) - 0.5 ; let B = A ; if ( B != A ) document . write ( " " ) ; else document . write ( B ) ;