I searched it and found that something in my code must be undefined
but I can’t figure out what and why.
const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["no-extra-semi", "no-dup-keys"]
};
function makeList(arr) {
// Only change code below this line
for (let i = 0; i < arr.length; i++) {
failureItems.push(`<li class="text-warning">${arr[i]}</li>`)
}
const failureItems = [];
// Only change code above this line
return failureItems;
}
const failuresList = makeList(result.failure);
Link to the challenge: