SyntaxStudy
Sign Up

Palindrome Check

JAVASCRIPT Medium +20 XP
Problem Description
Write a function `isPalindrome(str)` that returns `true` if the string reads the same forwards and backwards (ignore case), `false` otherwise.

Example:
isPalindrome('racecar') → true
isPalindrome('hello') → false
isPalindrome('Madam') → true

Test Cases

1
Input: isPalindrome('racecar')
Expected: 1
2
Input: isPalindrome('hello')
Expected:
3
Input: isPalindrome('Madam')
Expected: 1
4
Input: isPalindrome('level')
Expected: 1
Your Solution