Home | Mailing List | Blog | Tutorial Videos

Palindrome?

Does the following function correctly assess 'hannah' to be a palindrome? In other words, what gets logged?

function isPalindrome(str){
  var reverseText = str.split('').reverse().join('');
  return str == reverseText;
}

isPalindrome('hannah');

Select one: