How do I reverse the digits of a number using bitwise?
input:
x = 123;
output:
x = 321;
This takes Number x as a parameter and returns the reversed number.
Number
const reverse = (x) => Number(x.toString().split("").reverse().join(""));