freeCodeCamp's Javascript Certification Palindrome Checker Project.
A palindrome is a word or phrase that can be read the same way forwards and backwards, ignoring punctuation, case, and spacing.
Note: You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.
Objective: Build an app that is functionally similar to https://palindrome-checker.freecodecamp.rocks
- You should have an
input
element with anid
of"text-input"
√ - You should have a
button
element with anid
of"check-btn"
√ - You should have a
div
element with anid
of"result"
√ - When you click on the
#check-btn
element without entering a value into the#text-input
element, an alert should appear with the text"Please input a value"
- When the
#text-input
element only contains the letterA
and the#check-btn
element is clicked, the#result
element should contain the text"A is a palindrome"
- When the
#text-input
element contains the texteye
and the#check-btn
element is clicked, the#result
element should contain the text"eye is a palindrome"
- When the
#text-input
element contains the text_eye
and the#check-btn
element is clicked, the#result
element should contain the text"_eye is a palindrome"
- When the
#text-input
element contains the textrace car
and the#check-btn
element is clicked, the#result
element should contain the text"race car is a palindrome"
- When the
#text-input
element contains the textnot a palindrome
and the#check-btn
element is clicked, the#result
element should contain the text"not a palindrome is not a palindrome"
- When the
#text-input
element contains the textA man, a plan, a canal. Panama
and the#check-btn
element is clicked, the#result
element should contain the text"A man, a plan, a canal. Panama is a palindrome"
- When the
#text-input
element contains the textnever odd or even
and the#check-btn
element is clicked, the#result
element should contain the text"never odd or even is a palindrome"
- When the
#text-input
element contains the textnope
and the#check-btn
element is clicked, the#result
element should contain the text"nope is not a palindrome"
- When the
#text-input
element contains the textalmostomla
and the#check-btn
element is clicked, the#result
element should contain the text"almostomla is not a palindrome"
- When the
#text-input
element contains the textMy age is 0, 0 si ega ym.
and the#check-btn
element is clicked, the#result
element should contain the text"My age is 0, 0 si ega ym. is a palindrome"
- When the
#text-input
element contains the text1 eye for of 1 eye.
and the#check-btn
element is clicked, the#result
element should contain the text"1 eye for of 1 eye. is not a palindrome"
- When the
#text-input
element contains the text0_0 (: /-\ :) 0-0
and the#check-btn
element is clicked, the#result
element should contain the text"0_0 (: /-\ :) 0-0 is a palindrome"
- When the
#text-input
element contains the textfive|\_/|four
and the#check-btn
element is clicked, the#result
element should contain the text"five|\_/|four is not a palindrome"