1(viii)
The output of Math.max(-7, Math.min(-5, -4)) is:
- (a)-5
- (b)-4
- (c)-7
- (d)error
Show SolutionHide Solution↓
-5
Reason — The method Math.min(-5, -4) returns the smaller of the two values, which is -5. Then, Math.max(-7, -5) returns the greater of the two values, which is -5. Hence, the final output of Math.max(-7, Math.min(-5, -4)) is -5.