📜  如何在javascript代码示例中反转数字

📅  最后修改于: 2022-03-11 15:02:33.455000             🧑  作者: Mango

代码示例6
// how to reverse number in javascript
let number = 12345;
let reverse = parseInt(number.toString().split('').reverse().join(''));
console.log(reverse);
// Output:
// 54321