Highest power of 2 that divides the LCM of first N Natural numbers . | Function to find the highest power of 2 which divides LCM of first n natural numbers ; Driver code
function highestPower ( n ) { return parseInt ( Math . log ( n ) / Math . log ( 2 ) ) ; } var n = 15 ; document . write ( highestPower ( n ) ) ;