ES6 - Create Strings using Template Literals

Tell us what’s happening:
Can’t understand why I keep getting this error -" failuresList should be equal to the specified output." Can anybody help a brotha 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) {
  // Only change code below this line
  const failureItems = arr.map(x =>{
    return `<li class ="text-warning">${x}</li>`
  });
  // Only change code above this line
  console.log(failureItems)
  return failureItems;
}

const failuresList = makeList(result.failure);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge: ES6 - Create Strings using Template Literals

Link to the challenge:

Could it be the spacing in class ="?

1 Like

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