check if palindrome
function isPalindrome(str) {
str = str.toLowerCase();
return str === str.split("").reverse().join("");
}
check if palindrome
function isPalindrome(str) {
str = str.toLowerCase();
return str === str.split("").reverse().join("");
}
check for palindromes
function palindrome(str) {
var re = /[\W_]/g;// representing Non-alphanumetic characters
var lowRegStr = str.toLowerCase().replace(re, '');
var reverseStr = lowRegStr.split('').reverse().join('');
return reverseStr === lowRegStr;
}
palindrome("A man, a plan, a canal. Panama");
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us