Calculate Absolute Value
MATH
Problem
Given a number x
, return its absolute value.
Examples
absoluteValue(-5) // 5 absoluteValue(10) // 10 absoluteValue(0) // 0 absoluteValue(-3) // 3
Loading...
Given a number x
, return its absolute value.
absoluteValue(-5) // 5 absoluteValue(10) // 10 absoluteValue(0) // 0 absoluteValue(-3) // 3