Question: Write a function abs def abs(n: Double): Double that returns the absolute value of n. This a function that takes a value of type Double

Write a function abs def abs(n: Double): Double that returns the absolute value of n. This a function that takes a value of type Double and returns a value of type Double. This function corresponds to the JavaScript library function Math.abs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
