Tell us what’s happening:
Console
// running tests
- failuresList should be an array containing result failure messages.
// tests completed
Cannot complete the challenge, I suspect the , is missing to separate the array items? Any clue how to fix?
Your code so far
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
const failureItems = [];
for (let n = 0; n < arr.lenght; n++){
failureItems.push(`<li class="text-warning">${arr[n]}</li>`);
}
// Only change code above this line
return failureItems;
}
const failuresList = makeList(result.failure);
Your browser information:
User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1 Ddg/18.3
Challenge Information:
ES6 - Create Strings using Template Literals