How do I reverse the digits of a number using bitwise?
input:
x = 123;
output:
x = 321;
try this
var n = 352; function loop(n, r){ if(!n) return r; r = (r ? r * 10 : 0) + n % 10; return loop(Math.floor( n / 10), r); } console.log(loop(n));