freeCodeCamp: ES6: Create Strings using Template Literals - Test Fails - Doesn't detect template strings
Challenge Name
https://beta.freecodecamp.org/en/challenges/es6/create-strings-using-template-literals
Issue Description
The challenge is failing the last test, ‘Template strings were used’.
Browser Information
Browser Name, Version: Operating System: FireFox 57.0 (64-bit) and Chrome Version 63.0.3239.84 (Official Build) (64-bit) Mobile, Desktop, or Tablet: Laptop Windows 10 Professional 64-bit
Your Code
`const resultDisplayArray = result.failure.map(x => `<li class="text-warning">${x}</li>`);`
Screenshot

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 75 (7 by maintainers)
confirmed:
works but
does not work. And, there’s no mention of map in the lesson - and, map isn’t even introduced in the curriculum until the Functional Programming section which comes after this section.
Hi all. Thank you for taking the time to update us about this ongoing issue. Just wanted to let you all know that the regex test for this challenge was updated recently, and it should be pushed to production soon.
Seems like
mapis now the only passing method in the new version. The following 2 methods failed ‘Template strings were used’:I am also having this problem. I tried using map and I now get an error that says:
React is not defined
I thought I was getting this too but throwing map in here just makes it unnecessarily difficult.
Still getting
Invalid regular expression flagsI also get the Invalid regular expression flags error for below.
I’m still receiving Invalid regular expression flags error. https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals/
Yep still can’t find a working solution to this challenge
It is still not working. Can we have a light here please ?
Hi, I am also still getting Invalid regular expression flags with:
const resultDisplayArray = arr.map(item =>
<li class="text-warning">${item}</li>);Facing the same issue. I guess I’ll have to keep this challenge officially unfinished and move on. IM(H)O - for the scope of this challenge, referencing the array elements by their indices is the most elegant solution and using map/loops clutters up the code.
const resultDisplayArray = arr.map(x =>
<li class="text-warning">${x}</li>);const resultDisplayArray = [
<li class="text-warning">${arr[0]}</li>,<li class="text-warning">${arr[1]}</li>,<li class="text-warning">${arr[2]}</li>];both don’t work for me, I thought it was my code, but it seems like something is broken
Map method still doesn’t work. With or without return.
Hey, if anyone found a way please tell meeee, I can’t advance xD (i know i could skip it but oh my OCD)
I get Invalid regular expression flags error.
const resultDisplayArray = arr.map((msg) => { return
<li class="text-warning">${msg}</li>;});
Push doesn’t work in this exercise (or it hasn’t or me and seems like others), use the .map method to pass the test.
Mark Kleinhaus mkleinhaus@gmail.com mkleinhaus@gmail.com 206-234-4887
On Sun, Jun 3, 2018 at 6:10 AM, aenkirch notifications@github.com wrote:
const resultDisplayArray = arr.map(val=>{return
<li class="text-warning">${val}</li>});Getting Invalid regular expression flags result.
still waiting for fix
Right now neither MAP method nor the more simple but lengthy approaches work, same error - “Invalid regular expression flags” even though the other tests are passed
Still not working, rather frustrating
Confirmed still not working
I tried it with map and everything and I still get Invalid regular expression flags
@jsparadacelis I follow the code on that video ,that doesn’t work
i try wiht map, for loops, etc, but i don found a solution. You can see it, maybe found a key idea. https://www.youtube.com/watch?v=XzExdQye1Ls
@mirkocoppola80 yeah, I’m not sure how often their merge/builds are. I don’t think they’ve done one since May 30th though, so we’re waiting on that for the changes to take effect.
@P1xt Having the same problem. Thankfully is not only me.