A number is a palindrome if it reads the same both ways. Combine two earlier lessons: reverse the digits and compare with the original.
A neat optimization is to reverse only the second half. Keep peeling digits while n > rev. Then n === rev (even length) or n === floor(rev / 10) (odd length) means it's a palindrome, and the intermediate values never overflow.
Negative numbers are never palindromes here, because the - sign only appears on one side.