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

208
Views
Llamar a una función de promesa después de un retraso

Estoy tratando de hacer que una función de promesa se llame a sí misma repetidamente después del intervalo

La función de promesa:

 function bd() { return new Promise((resolve, reject) => { // gets message_bd resolve(message_bd) }) }

Intento llamarlo repetidamente cada 3 segundos así:

 var interval = setInterval(function(){ bd().then((message_bd) => { console.log(message_bd) },3000);

se llama a bd() después de los primeros 3 segundos y se resuelve el message_bd (todo funciona), pero luego aparece este error cuando terminan los segundos 3 segundos:

 bd().then((message_bd) => { ^ TypeError: bd is not a function

Agradecería cualquier ayuda :)

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!