💻ap computer science a review

Math.abs(number)

Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 examWritten by the Fiveable Content Team • Last updated August 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.

"Math.abs(number)" also found in:

2,589 studying →