Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Palindrome Checker

const palindrome = str = {
  str = str.replace(/[W+|_]/g, '').toLowerCase()
  
  const str1 = str.split('').reverse().join('')

  return str1 === str
}

palindrome("My age is 0, 0 si ega ym.");

// With love @kouqhar
Source by www.linkedin.com #
 
PREVIOUS NEXT
Tagged: #Palindrome #Checker
ADD COMMENT
Topic
Name
2+3 =