Skip to content

Commit b81d169

Browse files
problem 63 solved
1 parent a25cf8b commit b81d169

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

problem63/problem63.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* =================================================
2+
------ Programme for Finding Palindrome --------
3+
================================================= */
4+
5+
6+
const findPalindrome = value => {
7+
const valueIntoStr = value.toString();
8+
const valueIntoReverseStr = valueIntoStr.split("").reverse().join("");
9+
10+
if(valueIntoStr === valueIntoReverseStr){
11+
const message = `Your input text is "${value}" which is a "Palindrome".`;
12+
console.log(message);
13+
}
14+
else{
15+
const message = `Your input text is "${value}" which is "Not A Palindrome".`;
16+
console.log(message);
17+
}
18+
}
19+
20+
findPalindrome("eye");
21+
findPalindrome("madam");
22+
findPalindrome("Shourav");

0 commit comments

Comments
 (0)