Write a function named isPalindrome that determines whether a given string is a palindrome.

Learner Level
Loop
A palindrome is a word, phrase, or sequence that reads the same backward as forward, ignoring case and non-alphanumeric characters.
Example 1
Input:
s (string) = madam
Return:
(boolean) true
Example 2
Input:
s (string) = hello
Return:
(boolean) false
Example 3
Input:
s (string) = A man, a plan, a canal, Panama
Return:
(boolean) true
Example 4
Input:
s (string) = No lemon, no melon
Return:
(boolean) true

A string is considered a palindrome if it reads the same forward and backward, ignoring spaces, punctuation, and capitalization. To check if a string is a palindrome, first sanitize it by removing unwanted characters and converting it to the same case. Then, compare the sanitized string with its reverse.

Run your code to see the result.