how to turn a number negative in javascript

JavaScript
-Math.abs(num); // "-" before Math.abs()
Source

Also in JavaScript: