w3ressources exercise javascript reverse a number code example
Example: reverse number in js
function reversedNum(num) {
return (
parseFloat(
num
.toString()
.split('')
.reverse()
.join('')
) * Math.sign(num)
)
}