reverseNumber
Reverses a number.
- Use
Object.prototype.toString()to convertnto a string. - Use
String.prototype.split(''),Array.prototype.reverse()andString.prototype.join('')to get the reversed value ofnas a string. - Use
parseFloat()to convert the string to a number andMath.sign()to preserve its sign.