Update palindromes.js

fixed early bug