title: Getting invalid regular expression flag after running the program
body: <p>I am practicing ES6 on freeCodeCamp. Currently, I am solving a problem related to topic <strong>Template Literals</strong>. The problem statement is like</p>
  
  <blockquote>
    <p>Use template literal syntax with <em>backticks</em> to display each entry of the <em>result</em> object's <em>failure</em> array. Each entry should be wrapped inside a <em>li</em> element with the class attribute <em>text-warning</em>, and listed within the <em>resultDisplayArray</em>.</p>
  </blockquote>
  
  <p>After executing the code all test cases are passed except one </p>
  
  <blockquote>
    <p>Template strings were used</p>
  </blockquote>
  
  <p>and I am getting the error </p>
  
  <blockquote>
    <p>Invalid regular expression flags</p>
  </blockquote>
  
  <p>Please see below code and tell me where I am doing wrong.</p>
  
  <pre><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(value =&gt; 
    `&lt;li class="text-warning"&gt;${value}&lt;/li&gt;`);
    // change code above this line
  
    return resultDisplayArray;
  }
  /**
   * makeList(result.failure) should return:
   * [ &lt;li class="text-warning"&gt;no-var&lt;/li&gt;,
   *   &lt;li class="text-warning"&gt;var-on-top&lt;/li&gt;, 
   *   &lt;li class="text-warning"&gt;linebreak&lt;/li&gt; ]
   **/
  const resultDisplayArray = makeList(result.failure);
  </code></pre>