All about Bit Manipulation | Function to clear the ith bit of the given number N ; Create the mask for the ith bit unset ; Return the update value
function clearBit ( num , i ) { let mask = ~ ( 1 << i ) ; return num & mask ; }