Check if String is Palindrome
VKTinkoff
You need to write a function isPalindrome(str) that checks if the given string is a palindrome.
A string is considered a palindrome if it reads the same from left to right and right to left, ignoring letter case, spaces, and punctuation.
Examples:
Input 1: "А роза упала на лапу Азора"
Output 1: true
Input 2: "Do geese see God?"
Output 2: true
Input 3: "A man, a plan, a canal, Panama"
Output 3: true
JavaScript•UTF-8
Run your code to see results.
Click the Run button above
Check if String is Palindrome
VKTinkoff
You need to write a function isPalindrome(str) that checks if the given string is a palindrome.
A string is considered a palindrome if it reads the same from left to right and right to left, ignoring letter case, spaces, and punctuation.
Examples:
Input 1: "А роза упала на лапу Азора"
Output 1: true
Input 2: "Do geese see God?"
Output 2: true
Input 3: "A man, a plan, a canal, Panama"
Output 3: true
Run your code to see results.