You’ve hardcoded in your solution, your need to use the arr parameter given in the function otherwise your function would fail given either option of success or skipped.
You need to push each iteration to the array with resultDisplayArray.push()
But honestly even after doing these things to your code I still got 3 results as well. No idea what’s happening so i just re wrote it from scratch. Here are 2 solutions the first is basically your code with the required changes.
Hope this helps!
for (let i = 0; i < arr.length; i++) {
resultDisplayArray.push(`<li class="text-warning">${arr[i]}</li>`)
}
let resultDisplayArray = [];
arr.forEach(elem => {
resultDisplayArray.push(`<li class="text-warning">${elem}</li>`);
})```