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

236
Views
¿Hay alguna diferencia entre `resolver` y luego `return` y `return resolve()`

Sé sobre el código después de que se ejecute la resolución; No estoy hablando de eso. Mi pregunta es sobre devolver un objeto de resolve como:

 return resolve(err)

¿Es diferente a devolver nada? Me gusta:

 resolve(err) return

que es como

 ... resolve(err) }

Estoy hablando del caso canónico en el que se maneja la promesa con then y catch como:

 functionReturningAPromise().then().catch()
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

La declaración

 return resolve(err);

no tiene mucho sentido y podría ser confuso. resolve no devuelve nada explícitamente. La única razón para usar

 return resolve(err);

es acortar

 resolve(err); return;

Eso significa que

 return resolve(err);

y

 resolve(err); return;

son equivalentes.

about 4 years ago · Santiago Trujillo Report
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!