Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

what is palindrome

function Palindrome(str) { 

  str = str.replace(/ /g,"").toLowerCase();
  var compareStr = str.split("").reverse().join("");

  if (compareStr === str) {
    return true;
  } 
  else {
    return false;
  } 

}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #palindrome
ADD COMMENT
Topic
Name
8+4 =