Return Negative

Published by Deep Xavier 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(5) ➞ -5

returnNegative(-54) ➞ -54

returnNegative(0) ➞ 0

Notes

N/A

Watch a quick demo on how Edabit works.