ES6 - Create Strings using Template Literals

can you use map() to this solve the tagged template literals, i have implemented various solutions involuing the map functions but i have fallen short. i guess i may have to the initialize the fuction from the examples i saw on stackOverFlow(this will violate the exercise test parameter because you ought to do everything within the function). so can anyone help me out.
NB: i already know how to implement the solution using push(), i just want to try a different method.

  **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; i++) {
let failuresList = => `<li class="text-warning">${items}</li>`)
// Only change code above this line
return failureItems;
const failuresList = makeList(result.failure);
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36

Challenge: ES6 - Create Strings using Template Literals

Link to the challenge:

Yes, but if you are going to use map then do you really need a for loop? Isn’t map looping through the array already?

okay, can it still be used???

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