mirror of https://github.com/01-edu/public.git
721 B
721 B
Abs
Instructions
Create a function named isPositive
that takes a number as a argument, returning true
if the number is strictly positive, and false
otherwise.
Create a function named abs
that takes a number as an argument and returns its absolute value. You must make your own implementation. You must not use Math.abs()
.
Notions
Code provided
The provided code will be added to your solution, and does not need to be submitted.
Math.abs = undefined