Largest palindrome product in Javascript
I don't think, there is a real problem with your code. You just do not filter for the largest product, which is not necessarily your last output. Just add an additional check for the largest product, e.g. like this:
var x, y, product, max = 0;
for (x = 100; x <= 999; x++) {
for (y = x; y <= 999; y++) {
product = x * y;
if (Palindromic(product)) {
if( max < product ) { // this is new
max = product;
console.log(x + '*' + y + '=' + product);
}
}
}
}
This returns
913*993=906609
as the largest result.