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

99
Views
función que no pasa la prueba de objeto de argumentos

Actualmente estoy completando una tarea donde necesito aprobar la siguiente prueba

 * should work on an arguments object

Aquí está mi código.

 function first (array, n) { var result = []; if (Array.isArray(array)) { if (n && n > 0) { var number = n > array.length ? array.length : n; for (var i=0; i < number; i++) { result.push(array[i]); } } else { result.push(array[0]); } return result; } else { return result; } };

No estoy seguro de qué líneas debo modificar para que pase esta prueba, ¿alguien puede ayudarme?

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!