Tell us what’s happening:
I’m being shown that my array contains the result failure messages, they have the desired output and the console displays that “Template strings were used” and yet, the “Template strings were used” test shows as failed. I’m confused.
Your code so far
const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["id-blacklist", "no-dup-keys"]
};
function makeList(arr) {
"use strict";
// change code below this line
const resultDisplayArray = [`<li class="text-warning">${result.failure[0]}</li>`,
`<li class="text-warning">${result.failure[1]}</li>`,
`<li class="text-warning">${result.failure[2]}</li>`];
// change code above this line
return resultDisplayArray;
}
/**
* makeList(result.failure) should return:
* [ `<li class="text-warning">no-var</li>`,
* `<li class="text-warning">var-on-top</li>`,
* `<li class="text-warning">linebreak</li>` ]
**/
const resultDisplayArray = makeList(result.failure);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15.
Like I said before in my original reply, do not reference result.failure directly inside the makeList function. Instead use arr argument which IS result.failure.