Skip to content

Instantly share code, notes, and snippets.

@ajith-k-v
ajith-k-v / longestPalindrome.js
Last active November 9, 2021 10:34
JavaScript task: Find longest palindrome of the string "hellonevenlikestacocatandkayak"
function is_Palindrome(str1) {
var rev = str1.split("").reverse().join("");
return str1 == rev;
}
function longest_palindrome(str1){
var max_length = 0,
maxp = '';