Return Negative

PHOTO EMBED

Tue Oct 04 2022 10:06:42 GMT+0000 (Coordinated Universal Time)

Saved by @j_jivan #javascript

/*In this simple assignment you are given a number and have to make it negative. But maybe the number is already negative?*/

int makeNegative(int num)
{
  return (num>0)? num*-1:num;
}
content_copyCOPY

https://www.codewars.com/kata/55685cd7ad70877c23000102/train/javascript