Return Negative

Published by Giorgi Dzigoshvili in

Create a function that takes a number as an argument and returns negative of that number. Return negative numbers without any change.

Examples

returnNegative(4) ➞ -4

returnNegative(15) ➞ -15

returnNegative(-4) ➞ -4

returnNegative(0) ➞ 0

Notes

N/A

Watch a quick demo on how Edabit works.