Turn off the rightmost set bit | unsets the rightmost set bit of n and returns the result ; Driver Code
function fun ( n ) { return n & ( n - 1 ) ; } let n = 7 ; document . write ( " " + " " + fun ( n ) ) ;