Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

315
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda