Why does this work in Java but not in JavaScript? I tried using this in Java and its working perfectly fine but I can\'t figure out why it\'s only printing "Not a palin