Reversed String or Palindrome Solution

const checkPalindrome = (string) => {}
const checkPalindrome = (string) => {   string.toLowerCase() ===         string.toLowerCase().split("").reverse().join("")}
const checkPalindrome = (string) => {  if(string.toLowerCase() === string.toLowerCase().split("").reverse().join()){  return true
}else{
return "Try Again!"
}
}
const checkPalindrome = (string) => {if(string.toLowerCase() === string.toLowerCase().split("").reverse().join("")){return "This is a palindrome!"}else{return "Nope try again!"}}console.log("racecar --", checkPalindrome("racecar"))console.log("car --", checkPalindrome("car"))

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store