Quotes help make search much faster. Example: "Practice Makes Perfect"

Saturday, December 17, 2016

Codefights isCaseInsensitivePalindrome(inputString)


//sample solution
function isCaseInsensitivePalindrome(inputString) {
    var temp = inputString.toLowerCase();
    var tempReversed = temp.split("").reverse().join("");
    if(temp.localeCompare(tempReversed)==0){
        return true;
    } else {
        return false;
    }
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts