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

81
Views
should I add .then() after the async function call even when i don't need anything back from that function?

Let's say I have two async functions.

const functionTwo = async () => {
    //do something
}

const functionOne = async () => {
    try { 
        //do something
        functionTwo();
        //do something else
    } catch (e) {
        handleError(e)
    }
}

I dont want functionOne() to wait for functionTwo() to finish its execution so I didn't put await infront of functionTwo(). I'm using WebStorm IDE and its showing a warning that I should either put await or add .then() to functionTwo() call. Is it the right thing to do to put .then(), even when i don't need to do anything in it?

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!