📌  相关文章
📜  js 如果一个数字的倒数比原来的 num 好 - Javascript 代码示例

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

代码示例1
//function that takes a two-digit number and determines if it's the largest of two possible digit swaps.
function largestSwap(num) {
    return num / 10 > num % 10
}

console.log(largestSwap(14));
console.log(largestSwap(53));
console.log(largestSwap(99));