Untitled
4 years ago in Plain Text
var TEST = function () {
return {
exec: function (num) {
const numStr = '' + num;
let invNumStr = '', i = numStr.length;
while (numStr[--i]) {
let numChar = numStr[i];
if (numChar === '-') {
invNumStr = '-' + invNumStr;
break;
}
invNumStr += numStr[i];
}
return parseInt(invNumStr) || 0;
}
};
}();