ES6 String Template Literals Not Working

I am working on the exercise in the JavaScript Course titled " Create Strings using Template Literals"
I have the following code but it is not working for some reason:

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
    let 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);

When I run it in WebStorm I get the correct result, but it is not being accepted. What am I doing wrong?


I figured it out. I was missing an angular bracket.

I was missing a “>” character.

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