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
28
var assert = require('assert');
function shortestPalindrome(s) {
return s;
}
try {
assert.equal(shortestPalindrome('bubble'), 'elbbubble');
console.log(
'PASSED: ' +
"<code>shortestPalindrome('bubble')</code> should return <code>'elbbubble'</code>"
);
} catch (err) {
console.log(err);
}
try {
assert.equal(shortestPalindrome('dasndsadmx'), 'xmdasdnsadasndsadmx');
console.log(
'PASSED: ' +
"<code>shortestPalindrome('dasndsadmx')</code> should return <code>'xmdasdnsadasndsadmx'</code>"
);
} catch (err) {
console.log(err);
}
OUTPUT
Results will appear here.