//倒序一个整数 from 13579 to 97531
//int to str
//split str,reverse str,join str
//str to int
function foo(num1) {
let num2=Number(num1.toString().split("").reverse().join(""));
console.log(num2)
}
foo(13579);
输出结果:97531
//倒序一个整数 from 13579 to 97531
//int to str
//split str,reverse str,join str
//str to int
function foo(num1) {
let num2=Number(num1.toString().split("").reverse().join(""));
console.log(num2)
}
foo(13579);
输出结果:97531