Yes, you did use an iterator above, the ‘for’ loop. Basically, an ‘iterator’ is a command to do something over and over. If you have 1,000 failures in the code above you would have to write that out 1000 times.
Instead, you can use an iterator like the for loop or map like @Manish-Giri posted above that will do all the work for you.
The code above technically passes all the tests, but isn’t really a good solution since you had to type out all of the result.failures
// change code below this line
let resultDisplayArray =[] //Create an empty array to store each result.failure
for(let i = 0; i < result.failure.length; i++) { // i *<*
resultDisplayArray.push(`<li class="text-warning">${result.failure[i]}</li>`) //PUSH the item (1) to the array.
//repeat 1000 times if needed
}
// change code above this line
map, filter, and reduce methods are not introduced until the Functional Programming section, so a user at this point in the curriculum may not know how to use map.