(function(){ window.OpenPopKa = true;}())

Write a recursive function named "checkPalindrome" that takes a string and returns true if it is a palindrome and false if it is not a palindrome. A string is a palindrome if it reads the same forwards or back-wards.

[editor.getValue()]
if (guess[0] != initEditor) { console.log(guess[0]); window.codeValue = guess[0]; window.progexType= "RecurTutor"; window.summexName = "RecWCheckPalPROG"; } else { return ""; }

A string of length zero or one is a palindrome.

If the first character is not the same as the last, then it is not a palindrome.

Be careful. s.charAt() returns a character, but s.substring() returns a string. You cannot compare strings with ==.

The recursive call should remove the first and last characters.