Create Strings using Template Literals!

my code keeps throwing this exception "
failuresList should be equal to the specified output."

what could be wrong?

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++){
  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:83.0) Gecko/20100101 Firefox/83.0.

Challenge: Create Strings using Template Literals

Link to the challenge:

Hi @chibuezekelechi12!

Welcome to the forum!

Two things.

There is an error in the opening li tag

No space here

Hope that helps!

1 Like

yes it does. It’s always the little things causing the most headache. Thank you very much

1 Like