Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
The Odin Project - Fundamentals 04 remove an array

I have problems with exercise 04 at The Odin Project JS Fundamentals. Implement a function that takes an array and some other arguments then removes the other arguments from that array:

removeFromArray([1, 2, 3, 4], 3); // should remove 3 and return [1,2,4]

I found a solution and tested it successful on my chrome-console, but it fails every test in the terminal (with npm test ...). I don`t know whats wrong with the code. My solution:

const removeFromArray = function(arr, ...args) {
  let a = arr;
  let b = args;
  let c = a.filter(d => !b.includes(d));
  console.log(c);
};

I used the variables a, b, c, d to make it more understandable for myself. Could this be the problem?

Thank you!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!