Solusi LeetCode Reverse Interger
var reverse = function(x) {
let xStr = String(Math.abs(x)).split('').reverse().join('');
let int = parseInt(xStr);
if(int > Math.pow(2, 31)) return 0;
if(x < 0) return -int;
return int;
};
Restu Wahyu Saputra