UrbanPro

Learn Java Script Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is callback hell in Node.js?

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

IT Professional Trainer with 15 years of experience in IT Industry

When you are using the function inside a function and it really looks like hell, it considered as callback hell. doSomething(param1, param2, function(err, paramx){ doMore(paramx, function(err, result){ insertRow(result, function(err){ yetAnotherOperation(someparameter, function(s){ somethingElse(function(x){ }); }); }); }); }); There...
read more

When you are using the function inside a function and it really looks like hell, it considered as callback hell.

  1. doSomething(param1, param2, function(err, paramx){
  2. doMore(paramx, function(err, result){
  3. insertRow(result, function(err){
  4. yetAnotherOperation(someparameter, function(s){
  5. somethingElse(function(x){
  6. });
  7. });
  8. });
  9. });
  10. });

There are multiple techniques for dealing with callback hell.

  1. Using Async.js
  2. Using Promises
read less
Comments

When there is so much callbacks nested within one another, it causes callback hell.
Comments

Related Questions

Should I learn Python or JavaScript as a newbie?
Python is different from javascript. I prefer you go with python as it is in boom now.
Manisha
0 0
6
What is the best way to learn JavaScript?
Three resources I would suggest to have handy while learning JS are: 1. JavaScript MDN 2. You Don't Know JS Book Series 3. javascript.info
Umamahesh
0 0
5
What types of jobs are available for those that know just HTML/CSS and JavaScript?
Front-end developer, web designer, UI/UX developer, freelance web developer.
Pritty
0 0
5
Which language has the best future prospects: Python, Java, or JavaScript?
According to me, "Python" is the programming language having the best future prospect considering the current industry trend. Reason: Python is extensively used in advanced technologies such as Machine...
Atharva
0 0
5
Some basic program bass of java and how it work?
JavaScript (Lightweight & loosely typed client-side Scripting Language which needs interpreter) is entirely different from Java (Programming Language which needs compilation)
Shekhar

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java Interview Questions & Answers
Java Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my...

Differences Between HashMap vs HashSet In Java.
HashSet HashMap HashSet implements Set interface. HashMap implements Map interface. HashSet stores the data as objects. HashMap stores the data as key-value pairs. HashSet...

What is hoisting in Javascript?
As a matter of fact it is, javascript is an interpreted language and the javascript interpreter performs a lot of mystical stuff behind the scenes. Hoisting in JavaScript is certainly one of them. A quick...

NgModules vs. JavaScript modules (Angular 2)
The NgModule — a class decorated with @NgModule Decorator — is a fundamental feature of Angular. JavaScript also has its own module system for managing collections of JavaScript objects. It's...

Always keep learning
If you are in IT, in order to survive you have keep reading and keep polishing your skillsets and this you can do everyday by taking small steps like learning and implementing them. There are so many...

Recommended Articles

Here are the top 6 must have skills for every Web Designer : Technical Skills Web designers undoubtedly require very strong technical skills. They must have hands on using Web designing software and tools, such as Adobe Dreamweaver, Fireworks, Photoshop, Flash etc. In addition to the knowledge of design...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Looking for Java Script Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Script Training Classes?

The best tutors for Java Script Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Script Training with the Best Tutors

The best Tutors for Java Script Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more