Examples:
palindrome("abba") === true
palindrome("abcdefg") === false
function palindrome(str) { if (!str) { return str; } for (let i = 0; i < str.length/2 + 1; i++) { if (str[i] !== str[str.length-i-1]) { return false; } } return true; }