Day 23: String Palindrome of 100DaysCodingChallenge
Hello all,
I have started the 100 days of coding challenge to improve my programming skills..
Today is the Day23 of 100DaysCodingChallenge for
String Palindrome input String taken by the user.
Code :
let a = prompt("Enter a : ");
let b = a.split('').reverse().join('');
if (a == b) {
console.log(a, "is a Palindrome String.");
} else {
console.log(a, "is not a Palindrome String.");
}Output :
Happy Coding:)

Comments
Post a Comment