Set the K | function to set the kth bit ; kth bit of n is being set by this operation ; Driver code
function setKthBit ( n , k ) { return ( ( 1 << k ) n ) ; } let n = 10 , k = 2 ; document . write ( " " + setKthBit ( n , k ) ) ;