Predict output of the following: [2]
Math.pow(Math.min(-3,-2),Math.abs(Math.ceil(2.1))
Math.abs(Math.round ( -14.7 ) + Math.floor (-7.9))
Answers
Answered by
2
Math.pow( -3,1) , Math.abs( 1 )
in the Math.pow( -3 , 1) 1 is given because if there is no power for a number we must imagine 1 in the power and in Math. ceil (2.1 ) 1 is given as we must round off the smallest number and the number after the decimal is 1
therefore Math. pow= - 3 ; and Math.abs= 1
Math.abs( -15) , + Math.floor(-8)
Math.abs=15 + Math.floor(-8)
15+(-8)= 7
Similar questions