const palindrome = (str: string) => {
        const s = str.toLowerCase().replace(/[\W_]/g, '');
        return s === [...s].reverse().join('');
      };
      

      Typescript language logo
      Check palindrome

      Codiga's TypeScript Recipes

      Checks if the given string is a palindrome.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.