Check if the concatenation of first N natural numbers is divisible by 3 | Function that returns True if concatenation of first N natural numbers is divisible by 3 ; Check using the formula ; Given Number ; Function Call
function isDivisible ( N ) { return ( N - 1 ) % 3 != 0 ; } var N = 6 ; if ( isDivisible ( N ) ) document . write ( " " ) ; else document . write ( " " ) ;