Sarower Jahan Sarower Jahan - 9 months ago 35
Javascript Question

Convert negative and positive numbers to positive values javascipt

I am newer in Javascript. I am getting a dynamic value. Sometimes it comes with positive value and sometimes with negative value. But I always need positive value. Is there any way to convert all negetive or positive value to positive value?

Thanks a lot.


You can try by this way..


W3 Schools Demo