dave dave - 1 year ago 128
Javascript Question

Convert a negative number to a positive one in JavaScript

Is there a math function in JavaScript that converts numbers to positive value?

Answer Source

You could use this...

Math.abs(x)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download