Program to check if N is a Star Number | Function to check that the number is a star number ; Condition to check if the number is a star number ; Driver Code ; Function call
function isStar ( N ) { let n = ( 6 + Math . sqrt ( 24 * N + 12 ) ) / 6 ; return ( n - parseInt ( n ) ) == 0 ; } let i = 13 ; if ( isStar ( i ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }