You can use one of the Math.max() methods, or the ternary operator, that is, one of the following:
Math.max(a, b)
a > b ? a : b
Chat with our AI personalities
Find the maximum and minimum values that the function can take over all the values in the domain for the input. The range is the maximum minus the minimum.
Find the two numbers with the largest magnitudes (absolute values). The sum of their squares will be the maximum.
c = -7, c = -3, c = 2, and c= 5
Order the observations. Find the values of the observation that is a quarter of the way and three quarters of the way along the list of these ordered values. If necessary, interpolate between the values. The difference between the two values is the inter-quartile range and half that is the semi- IQR, as required.
38