Can I make this code any shorter than it already is?

const arrowPalindrome = word => {
    let input = word.split('').reverse().join('').replace(' ', '');

    return ((word.replace(' ', '') === input) ? `${word} is a Palindrome` : `${word} is not a Palindrome`);
}

Surely that’s possible. Important question is when it stops to be worth to make code as short as possible, while paying the price of losing code clarity?

2 Likes

@sanity check :rofl: