๐Ÿ’ปap computer science a review

Math.abs(number)

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.

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