JavaScript Palindrome Checker

Requirements

Implementation

The function palindrome(str) checks if the given unfiltered input string str is a palindrome. Returns true if the given string is a palindrome, false otheriwse.

Example Usage

Use the browser console to interact with the function (Ctrl + Shift + I, then select the "Console" tab):

> palindrome("racecar"); // true
> palindrome("RaceCar"); // true
> palindrome("race CAR"); // true
> palindrome("blizzard"); // false
> palindrome("fireball"); // false
> palindrome("wind"); // false