On the flip side of things, I might prefer to see a candidate come up with something like this as first stab rather than that 35-line mammoth of an isPalindrome() function in the article. function isPalindrome(str) { return (str.split("").reverse()).join("") == str; }
let is_palindrome str = str = String.rev str ;;
(function is_palindrome will return true or false for input str )