**Tell us what’s happening:**

This code passes for parameter 2 but doesn’t pass for 3. Can anyone tell me why?

**Your code so far**

```
function largestPalindromeProduct(digit) {
// Good luck!
if(digit === 2) {
for(let i=99; i>9; i--) {
for(let j=99; j>9; j--) {
let number = i * j;
let str = number.toString();
if(str === str.split("").reverse().join(""))
return number;
}
}
}
for(let i=999; i>99; i--) {
for(let j=999; j>99; j--) {
let number = i * j;
let str = number.toString();
if(str === str.split("").reverse().join(""))
return number;
}
}
return undefined;
}
largestPalindromeProduct(3);
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/coding-interview-prep/project-euler/problem-4-largest-palindrome-product