Stacked Methods Do Not Pass with removeJSComments
See original GitHub issueForum post: https://forum.freecodecamp.org/t/bug-found-in-this-challenge/458226
Is some part of the code processing chain causing this challenge to fail with the following code?
This fails
var filteredList = watchList.map(movie => ({
title: movie["Title"],
rating: movie["imdbRating"]
}))
.filter(r => {
return parseFloat(r.rating) >= 8.0;
})
This passes:
var filteredList = watchList.map(movie => ({title: movie["Title"],rating: movie["imdbRating"]})).filter(r => {
return parseFloat(r.rating) >= 8.0;
})
The match for .filter is failing. But it doesn’t seem to me like it should be the regex that is the issue assert(code.match(/\.filter/g));
so maybe we inadvertently broke something, somehow?
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Does removing comments improve code performance? ...
Removing comments will make the Javascript file smaller and easier to download. Other than that, it will not affect noticably performance at all....
Read more >Is there a method for differentiating informative comments ...
There is a very simple solution to this: remove the commented-out code. Really, there are only two good reasons to comment out code:...
Read more >Best practices for writing code comments
While all of these points are true, it would be a mistake to go to the other extreme and never write comments. Here...
Read more >Commenting Code in JavaScript - Types and Best Practices
Comments are notes written in the code that are ignored by the JavaScript engine, which means they don't affect the output in any...
Read more >Blade Templates - Laravel - The PHP Framework For Web ...
The Blade templating is based on regular expressions and attempts to pass a complex expression to the directive may cause unexpected failures. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Sembauke Thank you, for keeping up with this. I was a bit out of the loop with what was happening between this issue and the Safari issue. I will close this, once tested on
.dev
@ShaunSHamilton This should get fixed with https://github.com/freeCodeCamp/freeCodeCamp/pull/42254 which is a comment removal implementation using our own fork of the strip-comments lib.