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

139
Views
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
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!