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

187
Views
Error de devolución de llamada de Javascript en la función de clasificación

Hola a todos estoy recibiendo el siguiente error

 Error: Array.prototype.sort() expects a value to be returned at the end of arrow function array-callback-return

el código que está causando este error está debajo

 filteredData.sort((a, b) => { if (a.distance !== undefined) { let aValue = parseFloat(a.distance.split(' mi')[0]) let bValue = parseFloat(b.distance.split(' mi')[0]) if (aValue !== undefined && bValue !== undefined) { return aValue > bValue ? 1 : -1 } } else { return 1 } })

¿Alguien puede decirme qué estoy haciendo mal?

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!