Check if a Number is a Palindrome

Published by Pickle in

Create a function that returns true if a number is a palindrome.

Examples

IsPalindrome(838) ➞ true

IsPalindrome(4433) ➞ false

IsPalindrome(443344) ➞ true

Notes

  • A palindrome is a number that remains the same when reversed.
  • Bonus: Try solving this without turning the number into a string.
Watch a quick demo on how Edabit works.