Seek and Destroy Algorithm System Bug
See original GitHub issueChallenge Seek and Destroy has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function isequal(value) {
return value !== this;}
function destroyer(arr) {
filtered = arguments[0];
for (i=1; i<arguments.length; i++){
filtered = filtered.filter(isequal,arguments[i]);
}
return filtered;
}
destroyer([1, 2, 3, 1, 2, 3], 1);
Although my code above returns all the correct output and passes all the tests, the system will not let me proceed to the next challenge. It marks all the tests as failed. Seems to be a bug.
Issue Analytics
- State:
- Created 7 years ago
- Comments:33 (20 by maintainers)
Top Results From Across the Web
Seek and Destroy — The JavaScript Algorithm - Medium
Yes, I'm talking about Metallica and an algorithm that will search the values on an initial array that will be the same as...
Read more >freeCodeCamp Challenge Guide: Seek and Destroy
Seek and Destroy Problem Explanation This problem is a bit tricky because ... Basic Algorithm Scripting problem: Seek and Destroy, Get hint.
Read more >Seek and Destroy - freeCodeCamp Algorithm - Code Snippet
Learn how to solve the freeCodeCamp algorithm 'Seek and Destroy' using the Arguments Object and Array.prototype.splice() JavaScript methods.
Read more >JavaScript Algorithm: Seek and Destroy - Level Up Coding
JavaScript Algorithm: Seek and Destroy. We write a function that will remove every element from an array that is the same value as...
Read more >Seek and Destroy - Intermediate Algorithm Scripting - YouTube
In this intermediate algorithm scripting tutorial we do a project called Seek and Destroy. This video constitutes one part of many where I ......
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
Just went through, the thread, I think this should be closed as an edge case with the camper’s code. I agree detecting such code is costly, and adding any instructions will cause confusion to users.
Closing. Feel free to continue the discussion or re-open, but in my honest opinion, this should be left as it is.
One other solution I just found is to change the comparative operator from
!==
to!=
If you are not using a strict comparison operator it will work.