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

160
Views
How to be able to use the Arguments Object in Arrow Function

I want to access the Arguments Object in Arrow Function.

But,

const fn = () => {
    return arguments; // error
};

It is possible if we rewrite it like this.

const fn = (...args) => (function () {
  return arguments;
})(...args);

However, I want to write a simple code first to achieve this.

I want another solution.

I think it can be achieved by making the Arrow Function look like the Function.

const arrowFunc = () => {
    return arguments;
};

function func () {
    return arguments;
}

Object.setPrototypeOf(func, arrowFunc);

arrowFunc(); // error

But it doesn't work.

Give me a new idea.

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!