question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seek and Destroy Algorithm System Bug

See original GitHub issue

Challenge 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:closed
  • Created 7 years ago
  • Comments:33 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
raisedadeadcommented, Dec 25, 2016

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.

1reaction
tophermurphycommented, Nov 25, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found