digits. The sign is turned through 180°. Return True if it reads exactly the same after the turn, and False otherwise.
When turned, 0, 1 and 8 stay themselves, 6 becomes 9 and 9 becomes 6. The other digits (2, 3, 4, 5, 7) no longer look like digits. Turning the sign also reverses the order of the digits.digits='619' → True
Turned over, 6 becomes 9, 1 stays 1 and 9 becomes 6, and the order reverses: it reads "619" again.
digits='88' → True
An 8 turns into itself.
digits='26' → False
An upside-down 2 is not a digit at all.
digits.length ≤ 50digits consists of digits onlydigits='619'
True
Run checks the first 3 tests in your browser. Submit checks all 183 tests on the server, hidden ones included.