Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

isPalindrome

var isPalindrome = function (x) {
  const stringfyX = String(x)
    .split('')
    .join('')
  const reverseX = String(x)
    .split('')
    .reverse()
    .join('')
  if (stringfyX === reverseX) return true
  return false
}
 
PREVIOUS NEXT
Tagged: #isPalindrome
ADD COMMENT
Topic
Name
2+6 =