A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 99 x 91. Find the largest palindrome made from the product of two 3-digit numbers.
function reverseString(str) {
return str.split('').reverse().join('')
}
let i = 0
for(i = 100; i<=999; i++) {
for(let j = 100; j<=999; j++) {
if(reverseString(String(j*i)) == j*i) {
console.log(j*i)
}
}
}