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

140
Vistas
Labeling of parameters within function to pull arguments from rest parameter

I'm working my way through the Odin Project and have a simple question about rest parameters:

One of the tutorial asks to 'Implement a function that takes an array and some other arguments then removes the other arguments from that array:' and the solution they provide is below

I understand the arguments[0] bit pulls out the first argument from ...args, but does the 'val' parameter just work to pull any additional arguments from ...args? no matter how many other arguments after the first?

const removeFromArray = function(...args) {
    const array = arguments[0];
    return array.filter((val) => !args.includes(val));
};
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