check the result for true / false and print .
document . write ( ( isPower ( 10 , 1 ) ? 1 : 0 ) + " " ) ; document . write ( ( isPower ( 1 , 20 ) ? 1 : 0 ) + " " ) ; document . write ( ( isPower ( 2 , 128 ) ? 1 : 0 ) + " " ) ; document . write ( ( isPower ( 2 , 30 ) ? 1 : 0 ) + " " ) ;