How to implement palindrome in javascript

A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction.

The below example takes an input from the user and shows if the input is a palindrome or not!

Here is the complete code for your reference!