I wonder how to write palindrome in javascript, where I input different words and program shows if word is palindrome or not. For example word noon is palindrome, while bad
Here's a one-liner without using String.reverse,
const isPal = str => Array .apply(null, new Array(strLen = str.length)) .reduce((acc, s, i) => acc + str[strLen - (i + 1)], '') === str;