Tell us what’s happening:
So I tried the challenge and its giving me an error; ‘failuresList should be equal to the specified output’. I’m not really sure what its requiring of me at this moment because the code checks out. Please help me out.
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) {
"use strict"
// Only change code below this line
const failureItems = [];
for (let i= 0; i < arr.length; i++) {
failureItems.push(`<li class= "text-warning">${arr[i]}</li>`);
}
// Only change code above this line
return failureItems;
}
const failuresList = makeList(result.failure);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Challenge: ES6 - Create Strings using Template Literals
Link to the challenge: