题解 | #整数反转#
整数反转
https://www.nowcoder.com/practice/eceaa68482354edf9c3409c5b3e942b9
function _reverse(number) { // 补全代码 let obj = (number + '').split('').reverse().join('') if (obj.endsWith('-')) { let a = obj.split('').pop().unshift('-') return Number(a.join('')) }else { return Number(obj) } } _reverse(223)