Update largest-palindrome.js

Do you need to check i - 1 and i + 1? Seems redundantasdfadsf.