0

For example I entered 'AaAa' in the textBox when I reverse it. It will become this 'aAaA'. How can I make the condition true . I want to ignore even the letters is not in the same format. I do not use string methods.

for(var index = word - 1; index >= 0; index--) {
    console.log(reverseString += inputString[index]);
}

if (reverseString === inputString) {
    alert(inputString + "are same as " + reverseString + ' is Palindrome');
} else {
    alert('Not Palindrome');
}
  • I think this question is not duplicated because I want an answer without using string methods – LizQuen Update Jul 16 '18 at 23:53
  • IS there a legitimate reason for not using string methods or is this some kind of code puzzle? Do the Regex based answers in the linked question meet your requirements? – Jon P Jul 17 '18 at 01:10

0 Answers0