New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6: Create Strings using Template Literals - Test Fails - Doesn't detect template strings #16358
Comments
Update: after some investigation by one of our campers, it seems the staging branch fixes the issue but has not been ported over to beta. |
I can confirm that it does work on staging, but I think the description could use a bit of clarification. |
Had a similar issue. Agree with systimotic. Text change in the test cases proposed as follows: Current: Template strings were used |
I have looked into this today, the challenge does not indicate that using .map() is required, and I was able to solve/complete it with and without using .map(). Therefore I don't believe that this needs any changes? Paul (@PolarisTLX) and Kyle (@jklemon17) |
I checked this out recently using @mstellaluna's solution and also solved it without using map as @PolarisTLX did. Using map is probably the most concise way to complete this challenge, but I think we should leave it up to users how to go about it. I'm not sure the description needs any changes since the user is told what the makeList function should return. |
Seems like
|
@yoizfefisch, you're right. Both of those are valid solutions, but they don't pass. It seems like test case for template literals is not quite flexible enough:
The regex doesn't expect brackets before the next curly brace, and your solutions cause the test to fail. Should be a simple enough fix. I'm not the best with regex, but this should allow for different solutions like the ones above:
I'm not sure exactly where some characters would have to be double escaped with two slashes like in the current tests, though. Would anyone here in interested in updating this test and submitting a PR? Also, here's an updated link to the challenge in question: |
Would also like to report this is still an issue, map works for the solution. |
Considering I have the same problem on the stable version of ES6 on FCC that was just deployed earlier this week, I have some doubt considering my code.. Can someone help me ? Here is my code : https://repl.it/repls/DizzyNiftyLocatorprogram |
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 ***@***.***> wrote:
Considering I have the same problem on the stable version of ES6 on FCC
that was just deployed earlier this week, I have some doubt considering my
code.. Can someone help me ?
Here is my code : https://repl.it/repls/DizzyNiftyLocatorprogram
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16358 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQdgL5WB3BsARAzpDfgyWHG8VsYm29yaks5t4-A3gaJpZM4ROiPm>
.
|
They are passing result.failure as a parameter. The Right Answer Is // change code below this line |
confirmed:
works
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. |
@P1xt Having the same problem. Thankfully is not only me. |
|
i'm having the same problem |
@richa031 As pointed out above, you need to use Array.map, with your approach does not work. |
is there anything i wrote wrong? and why are we using map function here? |
It's a silly issue but but double quotes are also required between the string literal when single quotes should be an acceptable solution as well. |
In continuation to #16358 (comment), const resultDisplayArray = [];
for (let i = 0; i < arr.length; i++) {
resultDisplayArray[i] = `<li class="text-warning">${arr[i]}</li>`
} |
@kanexte thank u |
Just wanted to chime in and mention I am having this same problem, too. Glad to hear it's not me. Hope it gets fixed soon. |
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. |
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. |
how did u solve the issue @richa031 |
P1xt is rigth array.map is the key for this challenge but you shouldnot forget that it takes a function as a parameter |
I’m still receiving Invalid regular expression flags error. |
I tried it with map and everything and I still get Invalid regular expression flags |
Confirmed still not working |
Still not working, rather frustrating |
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 |
Hey, if anyone found a way please tell meeee, I can't advance xD (i know i could skip it but oh my OCD) |
Still not working for me. |
Hey, i'm just another guy to write that it still doesn't work. |
I've seen that this is supposedly fixed and not yet deployed but, wanted to post in case it needs more info. I've confirmed the correct output with console.log() however, my solution does not pass the test "Template strings were used".
console output:
|
Still not working. |
Map method still doesn't work. With or without return. |
still waiting for fix |
const resultDisplayArray = arr.map(val=>{return Getting Invalid regular expression flags result. |
const resultDisplayArray = arr.map(x => const resultDisplayArray = [ both don't work for me, I thought it was my code, but it seems like something is broken |
Tried to solve it today, but it still doesn't work. |
I've tried it also with escape marks:
but it is still "Invalid regular expression flags" |
I too have tried to solve it, but continue to get the same "Invalid regular expression flags" as an output. 2 out of the three test are being passed but I continue to get the message. const resultDisplayArray = arr.map(val => I also used a simple for loop and get the same result |
Still not fixed! 😢 |
yeah i have written it like 4 ways and it doesnt work. its busted. just skip it and move on |
Still not working.. |
Same problem;
returns the error "invalid regular expression flags" |
Confirm still not working. |
Yup, still not working. Getting the same error as everyone else, "Invalid Regular Expression Flags." |
It works! I try the same solution with map every week and now it has passed! Hooray! |
Worked for me too! :) Wasn't working yesterday. |
Confirmed now works with
Thanks for the fix. |
Aleluya!! it works |
alleluia.finally works |
this should work without the map function, just using normal template literals, ass this would teach how space is preserved without adding |
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
Screenshot
The text was updated successfully, but these errors were encountered: