+1 vote
in NodeJS Essentials by

How can you avoid callback hells?

1 Answer

0 votes
by

There are lots of ways to solve the issue of callback hells:

modularization: break callbacks into independent functions

use a control flow library, like async

use generators with Promises

use async/await (note that it is only available in the latest v7 release and not in the LTS version - you can read our experimental async/await how-to here)

Related questions

+1 vote
asked May 30, 2020 in NodeJS Essentials by SakshiSharma
0 votes
asked Jan 18, 2020 in Machine Learning by sharadyadav1986
...