English

The output of Math.max(−7, Math.min(−5 ,−4)) is ______. - Computer Applications

Advertisements
Advertisements

Question

The output of Math.max(−7, Math.min(−5,−4)) is ______.

Options

  • −5

  • −4

  • −7

  • error

MCQ
Fill in the Blanks
Advertisements

Solution

The output of Math.max(−7, Math.min(−5,−4)) is −5.

Explanation:

Math.min(–5,–4) gives –5 and Math.max(–7,–5) gives –5. Math.min() gives the minimum of values and Math.max() gives maximum of two values.

shaalaa.com
  Is there an error in this question or solution?
2024-2025 (March) Official Board
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×