Back to problems

Execution Task with Promise Chains

Algorithm · Coinbase · Easy

Create business-logic code made up of several stages that must run one after another through a promise chain. A stage may be asynchronous and return a promise. Make sure each task begins only after the preceding task has finished, and deal with any errors that arise. Also, make the synchronous and asynchronous portions as efficient as you can. run_tasks_in_sequence(tasks) accepts an array of functions, where each function may return a value or a promise, and returns a…

Checking your access…