Created
June 7, 2021 05:59
-
-
Save samandar-boymurodov/bfc7b82f459869f2f9dca0a67c12578a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number} x | |
* @return {boolean} | |
*/ | |
var isPalindrome = function(x) { | |
return x.toString().split("").reverse().join("") === x.toString() | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I loved this solition. because it so easy to read and understand. also it is faster than 97.26% of submitted answers.