Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

checkPalindrome

function checkPalindrome(inputString) {
    if (inputString === inputString.split('').reverse().join('')) {
        return true
    } else {
        return false
    }
}
console.log(checkPalindrome('aba')) //output: true
 
PREVIOUS NEXT
Tagged: #checkPalindrome
ADD COMMENT
Topic
Name
6+6 =