JavaScript program to check if a string is a palindrome or not:
function isPalindrome(str) {
return str === str.split("").reverse().join("");
}
console.log(isPalindrome("level"));
JavaScript program to check if a string is a palindrome or not:
function isPalindrome(str) {
return str === str.split("").reverse().join("");
}
console.log(isPalindrome("level"));
© 2024 python tutorials. python-tutorials.in