ES6 - Create Strings using Template Literals

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)  {
     for (let i = 0; i < arr.length; i++) {
    const failureItems = [
        `<li class="text-warning">${arr[0]}</li>`,
        `<li class="text-warning">${arr[1]}</li>`,
        `<li class="text-warning">${arr[2]}</li>`

    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/ Safari/537.36

Challenge: ES6 - Create Strings using Template Literals

Link to the challenge:

:balloon: Hi, welcome to the forum!
We see you have posted some code but did you have a question?

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