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

90
Views
Sequential execution of 2 functions in JavaScript

I am not very familiar with async/await and promises. Currently having two individual functions - to export files from X and upload those files to Y correspondingly.

export const exportFiles = async (A: string, B: string) : Promise<void> => {
    // statements to do the export
    return;
};


export const uploadFiles = async (C: string, D: string) : Promise<void> => {
    // statements to do the upload
    return;
};

When I try to make the function calls like:

exportFiles(A, B)
uploadFiles(C, D)

uploadFiles gets executed first since exportFiles is a time consuming function.

How do I program the order of execution? I want uploadFiles to start execution only after exportFiles gets executed fully.

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!