SyntaxFix
Write A Post
Hire A Developer
Questions
In vanilla javascript
if(number > 0)_x000D_ return -1*number;
Where number above is the positive number you intend to convert
This code will convert just positive numbers to negative numbers simple by multiplying by -1