6 lines
97 B
JavaScript
6 lines
97 B
JavaScript
|
function pos_to_neg(num)
|
||
|
{
|
||
|
return -Math.abs(num);
|
||
|
}
|
||
|
|
||
|
console.log(pos_to_neg(15));
|