Is the Number Symmetrical?

Published by Dāvis in

Create a function that takes a number as an argument and returns true or false depending on whether the number is symmetrical or not. A number is symmetrical when it is the same as its reverse.

Examples

is_symmetrical(7227) ➞ true

is_symmetrical(12567) ➞ false

is_symmetrical(44444444) ➞ true

is_symmetrical(9939) ➞ false

is_symmetrical(1112111) ➞ true

Notes

N/A

Watch a quick demo on how Edabit works.