Write a function isPalindromeWord(word) that returns true when word is a palindrome and false otherwise.
word has only Latin letters, from 1 to 1000 of them.'Racecar', 'NOON' and 'abBA' are palindromes.true or false.Tip: at the whiteboard there was no IDE. Try two indexes, one from each end of the word, that move toward each other (two pointers). The tests check only the result.
isPalindromeWord('Racecar')Returns true
isPalindromeWord('Level')Returns true
isPalindromeWord('hello')Returns false
isPalindromeWord('Racecar')trueisPalindromeWord('Level')trueisPalindromeWord('hello')falseHidden tests run on Submit.