if element is positive transform it to negative and viceversa javascript code example Example: convert negative number to positive in javascript Math.abs("the negative number")