ES6 - Create Strings using Template Literals, Solution explanation request

I just need help to understand why the code I typed in the solution is not correct, its telling me "failuresList should be equal to the specified output."

  **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 i = 0; i < arr.length; i++) {
  `<li class="text-warning">${failureItems.push(i)}</li>`;
}
// Only change code above this line

return failureItems;
}

const failuresList = makeList(result.failure);
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36 OPR/82.0.4227.23

Challenge: Create Strings using Template Literals

Link to the challenge:

console.log(failureItems)

does the contents of failureItems look correct?

oh, yeah. I’ve seen the mistake I made. My code was outputting only the numbers and not the contents of ‘failure’ array :sweat_smile:
Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.