Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
The Math.abs() function returns the absolute value of a number, which is the positive value of the number regardless of its original sign.
Related terms
Math.pow(base, exponent): This term refers to the power function in math where you raise a base to an exponent. For example, Math.pow(2, 3) would return 8 because 2 raised to the power of 3 equals 8.
Math.max(num1, num2): This term refers to the function that returns the larger of two given numbers. It's like having two contestants and determining who is taller by using this function.
Math.min(num1, num2): This term refers to the function that returns the smaller of two given numbers. It's similar to having two contestants and determining who is shorter by using this function.