Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
215,954 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.