Fun JavaScript example AC


  • 0
    J
    var isPalindrome = function(x) {
        if(x.toString().split('').reverse().join("") === x.toString()){
            return true;
        } else {
            return false;
        }
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.