Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Vithu Mathi
seal-mask
.a{fill-rule:evenodd;}techdegree
Vithu Mathi
Front End Web Development Techdegree Student 3,474 Points

NodeJs

Hello TreeHouse Community,

I am having a hard time understand what's a asynchronous calls? and what a asynchronous nodeJS APIs is?

Any help would be much appreciated.

1 Answer

Steven Parker
Steven Parker
230,274 Points

Asynchronous basically means "happening at the same time".

In a typical (synchronous) function call, the main program waits until the function is totally finished before it continues with the main code. But in an asynchronous call, the function just starts something but returns to the main program right away. Then the main code can continue running while the other action is happening at the same time.

An asynchronous call would typically have at least one callback argument, which would be another function it would call to indicate completion or other state change in the task it is performing.