Flip consecutive set bits starting from LSB of a given number | Function to find the number after converting 1 s from end to 0 s ; Return the logical AND of N and ( N + 1 ) ; Driver Code ; Function Call
function findNumber ( N ) { return N & ( N + 1 ) ; } let N = 39 ; document . write ( findNumber ( N ) ) ;