Tell us what’s happening:
I think I have part of it down - I know that there will be the template and the space inside will be filled by the failure messages. I think I want it to iterate through each of the failure messages singly. I tried to add a ...arr
but that didn’t do anything. I know one (I’m sure of several) missing piece is using the arr
somewhere. I also tried:
let arr = result.failure
but THAT was way off.
**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 =
[`<li class="text-warning">${result.failure}</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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62
Challenge: Create Strings using Template Literals
Link to the challenge: