Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
45
var assert = require('assert');
const longestPalindrome = (str) => {
// fill in
return '';
};
try {
assert.equal(longestPalindrome(''), '');
console.log('PASSED: ' + "`longestPalindrome('')` should return `''`");
} catch (err) {
console.log(err);
}
try {
assert.equal(longestPalindrome('algodaily'), 'a');
console.log(
'PASSED: ' + "`longestPalindrome('algodaily')` should return `'a'`"
);
} catch (err) {
console.log(err);
}
try {
assert.equal(longestPalindrome('gymmyg'), 'gymmyg');
OUTPUT
Results will appear here.