Created
November 27, 2019 05:46
-
-
Save omardeleo/890eb1aa72420bc320b1ac2308d88cbc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var reverse = function(x) { | |
| const rev = Math.abs(x).toString().split("").reverse("").join(""); | |
| if (rev > 2**31) return 0; | |
| return rev * Math.sign(x); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment