public/subjects/sign
davhojt 324a3a1983
docs(sign): correct grammar
2022-05-01 16:22:55 +01:00
..
README.md docs(sign): correct grammar 2022-05-01 16:22:55 +01:00

README.md

Sign

Instructions

Create a function named sign that takes one number argument; returning 1 if the number is positive, -1 if the number is negative and 0 if the number is exactly 0.

You must not just use Math.sign, make your own.

Create a function named sameSign that takes 2 numbers as arguments and returns true if they both have the same sign, or false otherwise.

Notions

Code provided

The provided code will be added to your solution, and does not need to be submitted.

Math.sign = undefined