JS, если наоборот числа лучше исходного числа

//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));
Lucky-Magnet