Create Strings using Template Literals - Map method not working

Create Strings using Template Literals - Map method not working
0

#1

What’s happening:

Hi beautiful people. Here to seek help from you.

I checked with all the HELP posts created on the forum but no-one discussed about the map method.
I am using map method to solve this but getting the following error:

“Invalid regular expression flags”

Is it a bug? Shall I proceed to leave the exercise this way? Is my solution correct?

_

The Code


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 = arr.map(a => 
    `<li class="text-warning">${a}</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 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals/


#2

Yes it is a bug. Skip for now.


#3

Thanks for the prompt response.